code: def leave_OperationDefinition(
      self, operation, key, parent, path, ancestors
  ):
      usages = self.context.get_recursive_variable_usages(operation)
  
      for usage in usages:
          node = usage.node
          type = usage.type
          var_name = node.name.value
          var_def = self.var_def_map.get(var_name)
          if var_def and type:
              # A var type is allowed if it is the same or more strict (e.g. is
              # a subtype of) than the expected type. It can be more strict if
              # the variable type is non-null when the expected type is nullable.
              # If both are list types, the variable item type can be more strict
              # than the expected item type (contravariant).
              schema = self.context.get_schema()
              var_type = type_from_ast(schema, var_def.type)
              if var_type and not is_type_sub_type_of(
                  schema, self.effective_type(var_type, var_def), type
              ):
                  self.context.report_error(
                      GraphQLError(
                          self.bad_var_pos_message(
                              var_name, var_type, type
                          ),
                          [var_def, node],
                      )
                  )
  
file_path: wandb/wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
imports: from ...error import GraphQLError
  from ...type.definition import GraphQLNonNull
  from ...utils.type_comparators import is_type_sub_type_of
  from ...utils.type_from_ast import type_from_ast
  from .base import ValidationRule
label_desc: Use image node_id 3 for calling the VariablesInAllowedPosition obj's underlying member method code with example usage: obj.leave_OperationDefinition(operation, key, parent, path, ancestors) without return types