code: def get_default_project(path=None):
      if path is None:
          path = os.getcwd()
  
      check = os.path.realpath(path)
      probable_path = None
      first_no_init_file = None
      for dir in traverse_parents(check, include_current=True):
          try:
              return Project.load(dir)
          except (
              FileNotFoundError,
              NotADirectoryError,
              PermissionError,
          ):
              pass
  
          if first_no_init_file is None:
              if os.path.exists(os.path.join(dir, "__init__.py")):
                  # In the case that a __init__.py exists, it's in 99% just a
                  # Python package and the project sits at least one level above.
                  continue
              else:
                  first_no_init_file = dir
  
          if _is_django_path(dir):
              return Project(dir, _django=True)
  
          if probable_path is None and _is_potential_project(dir):
              probable_path = dir
  
      if probable_path is not None:
          # TODO search for setup.py etc
          return Project(probable_path)
  
      if first_no_init_file is not None:
          return Project(first_no_init_file)
  
      curdir = path if os.path.isdir(path) else os.path.dirname(path)
      return Project(curdir)
  
imports: import os
  import json
  from jedi._compatibility import FileNotFoundError, NotADirectoryError, PermissionError
  from jedi.api.environment import SameEnvironment, get_cached_default_environment
  from jedi.api.exceptions import WrongVersion
  from jedi._compatibility import force_unicode
  from jedi.evaluate.sys_path import discover_buildout_paths
  from jedi.evaluate.cache import evaluator_as_method_param_cache
  from jedi.common.utils import traverse_parents
label_desc: Use image node_id 5 for calling a global function with example usage: get_default_project(path) and returns: Project, Project, Project, Project, Project