code: def load_module(name, filename):
      '''Load a module into name given its filename'''
      if sys.version_info < (3, 5):
          import imp
          import warnings
          with warnings.catch_warnings():  # Required for Python 2.7
              warnings.simplefilter("ignore", RuntimeWarning)
              return imp.load_source(name, filename)
      else:
          from importlib.machinery import SourceFileLoader
          loader = SourceFileLoader(name, filename)
          return loader.load_module(f load_module(name, filename):
      '''Load a module into name given its filename'''
      if sys.version_info < (3, 5):
          import imp
          import warnings
          with warnings.catch_warnings():  # Required for Python 2.7
              warnings.simplefilter("ignore", RuntimeWarning)
              return imp.load_source(name, filename)
      else:
          from importlib.machinery import SourceFileLoader
          loader = SourceFileLoader(name, filename)
          return loader.load_module()
docs: Load a module into name given its filename