code: def fields(type, args, *_):
      if isinstance(type, (GraphQLObjectType, GraphQLInterfaceType)):
          fields = []
          include_deprecated = args.get("includeDeprecated")
          for field_name, field in type.fields.items():
              if field.deprecation_reason and not include_deprecated:
                  continue
              fields.append(
                  Field(
                      name=field_name,
                      description=field.description,
                      type=field.type,
                      args=field.args,
                      deprecation_reason=field.deprecation_reason,
                  )
              )
          return fields
      return None
  
file_path: wandb/wandb/vendor/graphql-core-1.1/wandb_graphql/type/introspection.py
imports: from collections import OrderedDict, namedtuple
  from ..language.printer import print_ast
  from ..utils.ast_from_value import ast_from_value
  from .definition import GraphQLArgument, GraphQLEnumType, GraphQLEnumValue, GraphQLField, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType
  from .directives import DirectiveLocation
  from .scalars import GraphQLBoolean, GraphQLString
label_desc: Use image node_id 2 for calling the TypeFieldResolvers obj's underlying member method code with example usage: obj.fields(type, args) and returns: None, fields