code: def load(path):
      
  
      importpath = path.replace("/", ".").replace("\\", ".")
      if importpath[-3:] == ".py":
          importpath = importpath[:-3]
  
      try:
          importlib.import_module(importpath)
      except (ModuleNotFoundError, TypeError):
          exec(open(path).read())
docs: Helper function that tries to load a filepath (or python module notation)
      as a python module and on failure `exec` it.
  
      Args:
          path (str): Path or module to load
  
      The function tries to import `example.module` when either `example.module`,
      `example/module` or `example/module.py` is given.