def load_repository(self, path, verbose=True, ntrials=<NUM_LIT:3>):
assert isinstance(ntrials, int), "<STR_LIT>"<EOL>assert ntrials><NUM_LIT:0>, "<STR_LIT>"<EOL>repo = None<EOL>for _trial in range(ntrials):<EOL><INDENT>try:<EOL><INDENT>self.__load_repository(path=path, verbose=True)<EOL><DEDENT>except Exception as err1:<EOL><INDENT>try:<EOL><INDENT>from .OldRepository import Repository<EOL>REP = Repository(path)<EOL><DEDENT>except Exception as err2:<EOL><INDENT>error = "<STR_LIT>"%(err1, err2)<EOL>if self.DEBUG_PRINT_FAILED_TRIALS: print("<STR_LIT>"%(_trial, inspect.stack()[<NUM_LIT:1>][<NUM_LIT:3>], str(error)))<EOL><DEDENT>else:<EOL><INDENT>error = None<EOL>repo  = REP<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>error = None<EOL>repo  = self<EOL>break<EOL><DEDENT><DEDENT>assert error is None, error<EOL>return repo<EOL>
Load repository from a directory path and update the current instance.
First, new repository still will be loaded. If failed, then old
style repository load will be tried.

:Parameters:
    #. path (string): The path of the directory from where to load
       the repository from. If '.' or an empty string is passed,
       the current working directory will be used.
    #. verbose (boolean): Whether to be verbose about abnormalities
    #. ntrials (int): After aquiring all locks, ntrials is the maximum
       number of trials allowed before failing.
       In rare cases, when multiple processes
       are accessing the same repository components, different processes
       can alter repository components between successive lock releases
       of some other process. Bigger number of trials lowers the
       likelyhood of failure due to multiple processes same time
       alteration.

:Returns:
     #. repository (pyrep.Repository): returns self repository with loaded data.