code: def get_module(app, modname, verbose=False, failfast=False):
      
      module_name = '%s.%s' % (app, modname)
      try:
          module = import_module(module_name)
      except ImportError as e:
          if failfast:
              raise e
          elif verbose:
              print("Could not load %r from %r: %s" % (modname, app, e))
          return None
      if verbose:
          print("Loaded %r from %r" % (modname, app))
      return module
docs: Internal function to load a module from a single app.
  
      taken from https://github.com/ojii/django-load.