code: def validate(schema, ast, rules=specified_rules):
      assert schema, "Must provide schema"
      assert ast, "Must provide document"
      assert isinstance(schema, GraphQLSchema)
      type_info = TypeInfo(schema)
      return visit_using_rules(schema, type_info, ast, rules)
  
imports: from ..language.ast import FragmentDefinition, FragmentSpread, OperationDefinition
  from ..language.visitor import ParallelVisitor, TypeInfoVisitor, Visitor, visit
  from ..type import GraphQLSchema
  from ..utils.type_info import TypeInfo
  from .rules import specified_rules
label_desc: Use image node_id 1 for calling a global function with example usage: validate(schema, ast, rules) and returns: visit_using_rules