code: def get_argument_values(arg_defs, arg_asts, variables=None):
      """Prepares an object map of argument values given a list of argument
      definitions and list of argument AST nodes."""
      if not arg_defs:
          return {}
  
      if arg_asts:
          arg_ast_map = {arg.name.value: arg for arg in arg_asts}
      else:
          arg_ast_map = {}
  
      result = {}
      for name, arg_def in arg_defs.items():
          value_ast = arg_ast_map.get(name)
          if value_ast:
              value_ast = value_ast.value
  
          value = value_from_ast(value_ast, arg_def.type, variables)
  
          if value is None:
              value = arg_def.default_value
  
          if value is not None:
              # We use out_name as the output name for the
              # dict if exists
              result[arg_def.out_name or name] = value
  
      return result
  
file_path: wandb/wandb/vendor/graphql-core-1.1/wandb_graphql/execution/values.py
imports: from collections.abc import Iterable
  import json
  from ..error import GraphQLError
  from ..language.printer import print_ast
  from ..type import GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLScalarType, is_input_type
  from ..utils.is_valid_value import is_valid_value
  from ..utils.type_from_ast import type_from_ast
  from ..utils.value_from_ast import value_from_ast
label_desc: Use image node_id 2 for calling a global function with example usage: get_argument_values(arg_defs, arg_asts, variables) and returns: result, dict