code: def resolve_calls(func):
    
    node = quoting.parse_function(func)
    ResolveCalls(func).visit(node)
    return node
docs: Parse a function into an AST with function calls resolved.
  
    Since the calls are resolved using the global and local namespace of the
    function it means that procedural parameters (i.e. functions passed as
    arguments) won't be resolved.
  
    Similarly, functions defined inside of the function that we are trying to
    resolve won't be resolved, since they are not in the local namespace of the
    outer function.
  
    The function definition itself is also annotated, so that it can be matched
    to calls to it in other functions.
  
    Args:
      func: The function whose calls are being resolved.
  
    Returns:
      node: An AST where each `Call` node has a `func` annotation with the
      function handle that the call resolves to.
  
    Raises:
      AttributeError: When a function is used on the RHS of an assignment cannot
          be resolved (because it was passed as an argument or was defined in the
          body of the function).