parameters: (context, flow, search_name, pos)
return_statement: return result
docstring: 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.
docstring_summary: 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.::
docstring_tokens: 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 . ::
function: 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
function_tokens: def _check_flow_information ( context , flow , search_name , pos ) : 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