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: Produce a new checker with the given type redefined.
  
  Arguments:
  
      type (str):
  
          The name of the type to check.
  
      fn (collections.Callable):
  
          A function taking exactly two parameters - the type
          checker calling the function and the instance to check.
          The function should return true if instance is of this
          type and false otherwise.
  
  Returns:
  
      A new `TypeChecker` instance.
docstr_tok: ["Produce","a","new","checker","with","the","given","type","redefined",".","Arguments",":","type","(","str",")",":","The","name","of","the","type","to","check",".","fn","(","collections.Callable",")",":","A","function","taking","exactly","two","parameters","-","the","type","checker","calling","the","function","and","the","instance","to","check",".","The","function","should","return","true","if","instance","is","of","this","type","and","false","otherwise",".","Returns",":","A","new","`","TypeChecker","`","instance","."]
code: def redefine(self, type, fn):
      """
      Produce a new checker with the given type redefined.
  
      Arguments:
  
          type (str):
  
              The name of the type to check.
  
          fn (collections.Callable):
  
              A function taking exactly two parameters - the type
              checker calling the function and the instance to check.
              The function should return true if instance is of this
              type and false otherwise.
  
      Returns:
  
          A new `TypeChecker` instance.
      """
      return self.redefine_many({type: fn})
  
file_path: catboost/contrib/python/jsonschema/py2/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 2 for calling the TypeChecker obj's underlying member method code with example usage: obj.redefine(type, fn) and returns: self