code: def _check_flow_information(context, flow, search_name, pos):
      """Try to find out the type of a variable just with the information that
      is given by the flows: e.g. It is also responsible for assert checks.::
  
          if isinstance(k, str):
              k.  # <- completion here
  
      ensures that `k` is a string.
      """
      if not settings.dynamic_flow_information:
          return None
  
      result = None
      if is_scope(flow):
          # Check for asserts.
          module_node = flow.get_root_node()
          try:
              names = module_node.get_used_names()[search_name.value]
          except KeyError:
              return None
          names = reversed(
              [
                  n
                  for n in names
                  if flow.start_pos
                  <= n.start_pos
                  < (pos or flow.end_pos)
              ]
          )
  
          for name in names:
              ass = search_ancestor(name, "assert_stmt")
              if ass is not None:
                  result = _check_isinstance_type(
                      context, ass.assertion, search_name
                  )
                  if result is not None:
                      return result
  
      if flow.type in ("if_stmt", "while_stmt"):
          potential_ifs = [c for c in flow.children[1::4] if c != ":"]
          for if_test in reversed(potential_ifs):
              if search_name.start_pos > if_test.end_pos:
                  return _check_isinstance_type(
                      context, if_test, search_name
                  )
      return result
  
imports: from parso.python import tree
  from parso.tree import search_ancestor
  from jedi import debug
  from jedi import settings
  from jedi.evaluate.context import AbstractInstanceContext
  from jedi.evaluate import compiled
  from jedi.evaluate import analysis
  from jedi.evaluate import flow_analysis
  from jedi.evaluate.arguments import TreeArguments
  from jedi.evaluate import helpers
  from jedi.evaluate.context import iterable
  from jedi.evaluate.filters import get_global_filters, TreeNameDefinition
  from jedi.evaluate.base_context import ContextSet
  from jedi.parser_utils import is_scope, get_parent_scope
label_desc: Use image node_id 1 for calling a global function with example usage: _check_flow_information(context, flow, search_name, pos) and returns: result, None, None, _check_isinstance_type, result