<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_lib_module_dict(self):
 """Load the 'lib' directory as a python module, so it can be used to provide functions for rowpipe transforms. This only works filesystem packages"""


        from importlib import import_module


        if not self.ref:
            return {}

        u = parse_app_url(self.ref)

        if u.scheme == 'file':

            if not self.set_sys_path():
                return {}

            for module_name in self.lib_dir_names:

                try:
                    m = import_module(module_name)
                    return {k: v for k, v in m.__dict__.items() if not k.startswith('__')}
                except ModuleNotFoundError as e:
                    # We need to know if it is the datapackage's module that is missing
                    # or if it is a module that it imported
                    if not module_name in str(e):
                        raise # If not our module, it's a real error.

                    continue


        else:
            return {}