<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _load_module(self, name: YangIdentifier, rev: RevisionDate) -> Statement: """Read and parse a YANG module or submodule."""

        for d in self.module_search_path:
            run = 0
            while run < 2:
                fn = f"{d}/{name}"
                if rev and run == 0:
                    fn += "@" + rev
                fn += ".yang"
                try:
                    with open(fn, encoding='utf-8') as infile:
                        res = ModuleParser(infile.read(), name, rev).parse()
                except (FileNotFoundError, PermissionError, ModuleContentMismatch):
                    run += 1
                    continue
                return res
        raise ModuleNotFound(name, rev)