docs: def _upgrade_recipe_find_path(import_str, create=True):
      """Determine repository name and path for new upgrade.
  
      It is based on package import path.
      """
      try:
          # Import package
          m = import_string(import_str)
  
          # Check if package or module
          if m.__package__ is not None and m.__package__ != m.__name__:
              raise RuntimeError(
                  "Expected package but found module at '%s'." % import_str
              )
  
          # Create upgrade directory if it does not exists
          path = os.path.join(os.path.dirname(m.__file__), "upgrades")
          if not os.path.exists(path) and create:
              os.makedirs(path)
  
          # Create init file if it does not exists
          init = os.path.join(path, "__init__.py")
          if not os.path.exists(init) and create:
              open(init, 'a').close()
  
          repository = m.__name__.split(".")[-1]
  
          return (path, repository)
      except ImportError:
          raise RuntimeError("Could not find module '%s'." % import_str)
      except SyntaxError:
          raise RuntimeError("Module '%s' has syntax errors." % import_str)