class_docstr: A ``type`` property checker.
  
  A `TypeChecker` performs type checking for an `IValidator`. Type
  checks to perform are updated using `TypeChecker.redefine` or
  `TypeChecker.redefine_many` and removed via `TypeChecker.remove`.
  Each of these return a new `TypeChecker` object.
  
  Arguments:
  
      type_checkers (dict):
  
          The initial mapping of types to their checking functions.
class_docstr_tok: ["A","``","type","``","property","checker",".","A","`","TypeChecker","`","performs","type","checking","for","an","`","IValidator","`",".","Type","checks","to","perform","are","updated","using","`","TypeChecker.redefine","`","or","`","TypeChecker.redefine_many","`","and","removed","via","`","TypeChecker.remove","`",".","Each","of","these","return","a","new","`","TypeChecker","`","object",".","Arguments",":","type_checkers","(","dict",")",":","The","initial","mapping","of","types","to","their","checking","functions","."]
docstr: Check if the instance is of the appropriate type.
  
  Arguments:
  
      instance (object):
  
          The instance to check
  
      type (str):
  
          The name of the type that is expected.
  
  Returns:
  
      bool: Whether it conformed.
  
  
  Raises:
  
      `jsonschema.exceptions.UndefinedTypeCheck`:
          if type is unknown to this object.
docstr_tok: ["Check","if","the","instance","is","of","the","appropriate","type",".","Arguments",":","instance","(","object",")",":","The","instance","to","check","type","(","str",")",":","The","name","of","the","type","that","is","expected",".","Returns",":","bool",":","Whether","it","conformed",".","Raises",":","`","jsonschema.exceptions.UndefinedTypeCheck","`",":","if","type","is","unknown","to","this","object","."]
code: def is_type(self, instance, type):
      """
      Check if the instance is of the appropriate type.
  
      Arguments:
  
          instance (object):
  
              The instance to check
  
          type (str):
  
              The name of the type that is expected.
  
      Returns:
  
          bool: Whether it conformed.
  
  
      Raises:
  
          `jsonschema.exceptions.UndefinedTypeCheck`:
              if type is unknown to this object.
      """
      try:
          fn = self._type_checkers[type]
      except KeyError:
          raise UndefinedTypeCheck(type)
  
      return fn(self, instance)
  
file_path: catboost/contrib/python/jsonschema/py3/jsonschema/_types.py
imports: import numbers
  from pyrsistent import pmap
  import attr
  from jsonschema.compat import int_types, str_types
  from jsonschema.exceptions import UndefinedTypeCheck
label_desc: Use image node_id 1 for calling the TypeChecker obj's underlying member method code with example usage: obj.is_type(instance, type) and returns: fn