code: def load_mod(module, package):
      
      name = '%s.%s' % (package.__name__, module)
      if name in sys.modules:
          return sys.modules[name]
      return importlib.import_module(name, package=package.__name__)
docs: Load a module named ``module`` from given search``path``
  
      The module path prefix is set according to the ``prefix`` argument.
      By defualt the module is loaded as if it comes from a global
      'db_migrations' package.  As such, it may conflict with any 'db_migration'
      package. The module can be looked up in ``sys.modules`` as
      ``db_migration.MODNAME`` where ``MODNAME`` is the name supplied as
      ``module`` argument. Keep in mind that relative imports from within the
      module depend on this prefix.
  
      This function raises an ``ImportError`` exception if module is not found.
  
      :param module:  name of the module to load
      :param package: package object
      :returns:       module object