code: def infer_return_types(function_context):
      """
      Infers the type of a function's return value,
      according to type annotations.
      """
      annotation = py__annotations__(function_context.tree_node).get(
          "return", None
      )
      if annotation is None:
          # If there is no Python 3-type annotation, look for a Python 2-type annotation
          node = function_context.tree_node
          comment = parser_utils.get_following_comment_same_line(node)
          if comment is None:
              return NO_CONTEXTS
  
          match = re.match(
              r"^#\s*type:\s*\([^#]*\)\s*->\s*([^#]*)", comment
          )
          if not match:
              return NO_CONTEXTS
  
          return _evaluate_annotation_string(
              function_context.get_root_context(),
              match.group(1).strip(),
          )
  
      module_context = function_context.get_root_context()
      return _evaluate_for_annotation(module_context, annotation)
  
imports: import os
  import re
  from parso import ParserSyntaxError, parse, split_lines
  from parso.python import tree
  from jedi._compatibility import unicode, force_unicode
  from jedi.evaluate.cache import evaluator_method_cache
  from jedi.evaluate import compiled
  from jedi.evaluate.base_context import NO_CONTEXTS, ContextSet
  from jedi.evaluate.lazy_context import LazyTreeContext
  from jedi.evaluate.context import ModuleContext
  from jedi.evaluate.helpers import is_string
  from jedi import debug
  from jedi import parser_utils
label_desc: Use image node_id 8 for calling a global function with example usage: infer_return_types(function_context) and returns: _evaluate_for_annotation, _evaluate_annotation_string, NO_CONTEXTS, NO_CONTEXTS