code: def _evaluate_for_statement_string(module_context, string):
      code = dedent(
          u(
              """
      def pseudo_docstring_stuff():
          '''
          Create a pseudo function for docstring statements.
          Need this docstring so that if the below part is not valid Python this
          is still a function.
          '''
      {}
      """
          )
      )
      if string is None:
          return []
  
      for element in re.findall(r"((?:\w+\.)*\w+)\.", string):
          # Try to import module part in dotted name.
          # (e.g., 'threading' in 'threading.Thread').
          string = "import %s\n" % element + string
  
      # Take the default grammar here, if we load the Python 2.7 grammar here, it
      # will be impossible to use `...` (Ellipsis) as a token. Docstring types
      # don't need to conform with the current grammar.
      grammar = module_context.evaluator.latest_grammar
      try:
          module = grammar.parse(
              code.format(indent_block(string)), error_recovery=False
          )
      except ParserSyntaxError:
          return []
      try:
          funcdef = next(module.iter_funcdefs())
          # First pick suite, then simple_stmt and then the node,
          # which is also not the last item, because there's a newline.
          stmt = funcdef.children[-1].children[-1].children[-2]
      except (AttributeError, IndexError):
          return []
  
      if stmt.type not in ("name", "atom", "atom_expr"):
          return []
  
      from jedi.evaluate.context import FunctionContext
  
      function_context = FunctionContext(
          module_context.evaluator, module_context, funcdef
      )
      func_execution_context = function_context.get_function_execution()
      # Use the module of the param.
      # TODO this module is not the module of the param in case of a function
      # call. In that case it's the module of the function call.
      # stuffed with content from a function call.
      return list(_execute_types_in_stmt(func_execution_context, stmt))
  
file_path: catboost/contrib/python/jedi/py3/jedi/evaluate/docstrings.py
imports: import re
  from textwrap import dedent
  from parso import parse, ParserSyntaxError
  from jedi._compatibility import u
  from jedi.evaluate.utils import indent_block
  from jedi.evaluate.cache import evaluator_method_cache
  from jedi.evaluate.base_context import iterator_to_context_set, ContextSet, NO_CONTEXTS
  from jedi.evaluate.lazy_context import LazyKnownContexts
label_desc: Use image node_id 7 for calling a global function with example usage: _evaluate_for_statement_string(module_context, string) and returns: list, list, list, list, list