def load_local_plugin(name):
        """Import a local plugin accessible through Python path."""
        try:
            module_name = '.'.join(name.split('.')[:-1])
            module_obj = importlib.import_module(name=module_name)
            obj = getattr(module_obj, name.split('.')[-1])
            return obj
        except (ImportError, AttributeError, ValueError) as e:
            raise PluginNotFoundError(e)
def load_local_plugin ( name ) : try : module_name = '.' . join ( name . split ( '.' ) [ : - 1 ] ) module_obj = importlib . import_module ( name = module_name ) obj = getattr ( module_obj , name . split ( '.' ) [ - 1 ] ) return obj except ( ImportError , AttributeError , ValueError ) as e : raise PluginNotFoundError ( e )
Import a local plugin accessible through Python path.