code: def _get_named_type_ast(type_ast):
      named_type = type_ast
      while isinstance(named_type, (ast.ListType, ast.NonNullType)):
          named_type = named_type.type
  
      return named_type
  
file_path: wandb/wandb/vendor/graphql-core-1.1/wandb_graphql/utils/build_ast_schema.py
imports: from ..execution.values import get_argument_values
  from ..language import ast
  from ..pyutils.ordereddict import OrderedDict
  from ..type import GraphQLArgument, GraphQLBoolean, GraphQLDeprecatedDirective, GraphQLDirective, GraphQLEnumType, GraphQLEnumValue, GraphQLField, GraphQLFloat, GraphQLID, GraphQLIncludeDirective, GraphQLInputObjectField, GraphQLInputObjectType, GraphQLInt, GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, GraphQLSchema, GraphQLSkipDirective, GraphQLString, GraphQLUnionType
  from ..type.introspection import __Directive, __DirectiveLocation, __EnumValue, __Field, __InputValue, __Schema, __Type, __TypeKind
  from ..utils.value_from_ast import value_from_ast
label_desc: Use image node_id 3 for calling a global function with example usage: _get_named_type_ast(type_ast) and returns: named_type