code: def setType(key, valueType):
      """check key type"""
      return And(
          valueType, error=SCHEMA_TYPE_ERROR % (key, valueType.__name__)
      )
  
imports: import json
  import os
  from schema import And, Optional, Or, Regex, Schema, SchemaError
  from nni.tools.package_utils.tuner_factory import create_validator_instance
  from .common_utils import get_yml_content, print_warning
  from .constants import SCHEMA_PATH_ERROR, SCHEMA_RANGE_ERROR, SCHEMA_TYPE_ERROR
label_desc: Use image node_id 1 for calling a global function with example usage: setType(key, valueType) and returns: And