code: def _load_module(
      evaluator,
      path=None,
      code=None,
      sys_path=None,
      import_names=None,
      safe_module_name=False,
  ):
      if import_names is None:
          dotted_name = None
      else:
          dotted_name = ".".join(import_names)
      try:
          return evaluator.module_cache.get(dotted_name)
      except KeyError:
          pass
      try:
          return evaluator.module_cache.get_from_path(path)
      except KeyError:
          pass
  
      if isinstance(path, ImplicitNSInfo):
          from jedi.evaluate.context.namespace import (
              ImplicitNamespaceContext,
          )
  
          module = ImplicitNamespaceContext(
              evaluator,
              fullname=path.name,
              paths=path.paths,
          )
      else:
          if sys_path is None:
              sys_path = evaluator.get_sys_path()
  
          if path is not None and path.endswith(
              (".py", ".zip", ".egg")
          ):
              module_node = evaluator.parse(
                  code=code,
                  path=path,
                  cache=True,
                  diff_cache=settings.fast_parser,
                  cache_path=settings.cache_directory,
              )
  
              from jedi.evaluate.context import ModuleContext
  
              module = ModuleContext(
                  evaluator,
                  module_node,
                  path=path,
                  code_lines=get_cached_code_lines(
                      evaluator.grammar, path
                  ),
              )
          else:
              assert dotted_name is not None
              module = compiled.load_module(
                  evaluator, dotted_name=dotted_name, sys_path=sys_path
              )
  
      if module is not None and dotted_name is not None:
          add_module_to_cache(
              evaluator, dotted_name, module, safe=safe_module_name
          )
  
      return module
  
imports: import os
  from parso.python import tree
  from parso.tree import search_ancestor
  from parso import python_bytes_to_unicode
  from jedi._compatibility import FileNotFoundError, ImplicitNSInfo, force_unicode, unicode
  from jedi import debug
  from jedi import settings
  from jedi.parser_utils import get_cached_code_lines
  from jedi.evaluate import sys_path
  from jedi.evaluate import helpers
  from jedi.evaluate import compiled
  from jedi.evaluate import analysis
  from jedi.evaluate.utils import unite
  from jedi.evaluate.cache import evaluator_method_cache
  from jedi.evaluate.filters import AbstractNameDefinition
  from jedi.evaluate.base_context import ContextSet, NO_CONTEXTS
label_desc: Use image node_id 3 for calling a global function with example usage: _load_module(evaluator, path, code, sys_path, import_names, safe_module_name) and returns: module, evaluator, evaluator