def _lookup(cls: str) -> LdapObjectClass:
    """ Lookup module.class. """
    if isinstance(cls, str):
        module_name, _, name = cls.rpartition(".")
        module = importlib.import_module(module_name)
        try:
            cls = getattr(module, name)
        except AttributeError:
            raise AttributeError("%s reference cannot be found" % cls)
    return cls
def _lookup ( cls : str ) -> LdapObjectClass : if isinstance ( cls , str ) : module_name , _ , name = cls . rpartition ( "." ) module = importlib . import_module ( module_name ) try : cls = getattr ( module , name ) except AttributeError : raise AttributeError ( "%s reference cannot be found" % cls ) return cls
Lookup module.class.