docstr: Raises an exception for TypeErrors
  
  Args:
      msg (str): the exception message
  
  Keyword Args:
      path_to_item (list): a list of keys an indices to get to the
                           current_item
                           None if unset
      valid_classes (tuple): the primitive classes that current item
                             should be an instance of
                             None if unset
      key_type (bool): False if our value is a value in a dict
                       True if it is a key in a dict
                       False if our item is an item in a list
                       None if unset
docstr_tok: ["Raises","an","exception","for","TypeErrors","Args",":","msg","(","str",")",":","the","exception","message","Keyword","Args",":","path_to_item","(","list",")",":","a","list","of","keys","an","indices","to","get","to","the","current_item","None","if","unset","valid_classes","(","tuple",")",":","the","primitive","classes","that","current","item","should","be","an","instance","of","None","if","unset","key_type","(","bool",")",":","False","if","our","value","is","a","value","in","a","dict","True","if","it","is","a","key","in","a","dict","False","if","our","item","is","an","item","in","a","list","None","if","unset"]
code: def __init__(
      self, msg, path_to_item=None, valid_classes=None, key_type=None
  ):
      """Raises an exception for TypeErrors
  
      Args:
          msg (str): the exception message
  
      Keyword Args:
          path_to_item (list): a list of keys an indices to get to the
                               current_item
                               None if unset
          valid_classes (tuple): the primitive classes that current item
                                 should be an instance of
                                 None if unset
          key_type (bool): False if our value is a value in a dict
                           True if it is a key in a dict
                           False if our item is an item in a list
                           None if unset
      """
      self.path_to_item = path_to_item
      self.valid_classes = valid_classes
      self.key_type = key_type
      full_msg = msg
      if path_to_item:
          full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
      super(ApiTypeError, self).__init__(full_msg)
  
label_desc: Use image node_id 1 to create a new ApiTypeError object from inherited base classes: OpenApiException, TypeError with example: obj = ApiTypeError(msg, path_to_item, valid_classes, key_type)