parameters: (call, node_a, all_nodes)
return_statement: return None, None
docstring: Given a call that happened on a node (node_a), return the node
      that the call links to and the call itself if >1 node matched.
  
      :param call Call:
      :param node_a Node:
      :param all_nodes list[Node]:
  
      :returns: The node it links to and the call if >1 node matched.
      :rtype: (Node|None, Call|None)
docstring_summary: Given a call that happened on a node (node_a), return the node
      that the call links to and the call itself if >1 node matched.
docstring_tokens: Given a call that happened on a node ( node_a ) return the node that the call links to and the call itself if > 1 node matched .
function: def _find_link_for_call(call, node_a, all_nodes):
      """
      Given a call that happened on a node (node_a), return the node
      that the call links to and the call itself if >1 node matched.
  
      :param call Call:
      :param node_a Node:
      :param all_nodes list[Node]:
  
      :returns: The node it links to and the call if >1 node matched.
      :rtype: (Node|None, Call|None)
      """
  
      all_vars = node_a.get_variables(call.line_number)
  
      for var in all_vars:
          var_match = call.matches_variable(var)
          if var_match:
              # Unknown modules (e.g. third party) we don't want to match)
              if var_match == OWNER_CONST.UNKNOWN_MODULE:
                  return None, None
              assert isinstance(var_match, Node)
              return var_match, None
  
      possible_nodes = []
      if call.is_attr():
          for node in all_nodes:
              # checking node.parent != node_a.file_group() prevents self linkage in cases like
              # function a() {b = Obj(); b.a()}
              if call.token == node.token and node.parent != node_a.file_group():
                  possible_nodes.append(node)
      else:
          for node in all_nodes:
              if call.token == node.token \
                 and isinstance(node.parent, Group)  \
                 and node.parent.group_type == GROUP_TYPE.FILE:
                  possible_nodes.append(node)
              elif call.token == node.parent.token and node.is_constructor:
                  possible_nodes.append(node)
  
      if len(possible_nodes) == 1:
          return possible_nodes[0], None
      if len(possible_nodes) > 1:
          return None, call
      return None, None
function_tokens: def _find_link_for_call ( call , node_a , all_nodes ) : all_vars = node_a . get_variables ( call . line_number ) for var in all_vars : var_match = call . matches_variable ( var ) if var_match : # Unknown modules (e.g. third party) we don't want to match) if var_match == OWNER_CONST . UNKNOWN_MODULE : return None , None assert isinstance ( var_match , Node ) return var_match , None possible_nodes = [ ] if call . is_attr ( ) : for node in all_nodes : # checking node.parent != node_a.file_group() prevents self linkage in cases like # function a() {b = Obj(); b.a()} if call . token == node . token and node . parent != node_a . file_group ( ) : possible_nodes . append ( node ) else : for node in all_nodes : if call . token == node . token and isinstance ( node . parent , Group ) and node . parent . group_type == GROUP_TYPE . FILE : possible_nodes . append ( node ) elif call . token == node . parent . token and node . is_constructor : possible_nodes . append ( node ) if len ( possible_nodes ) == 1 : return possible_nodes [ 0 ] , None if len ( possible_nodes ) > 1 : return None , call return None , None