code: def is_of_types(obj, the_types):
      '''
      :param obj: object to assert
      :param the_types: iterable of types, or a signle type
      :raise: an exception if obj is not an instance of types
      '''
      if not isinstance(obj, the_types):
          raise KittyException('object type (%s) is not one of (%s)' % (type(obj), the_types)f is_of_types(obj, the_types):
      '''
      :param obj: object to assert
      :param the_types: iterable of types, or a signle type
      :raise: an exception if obj is not an instance of types
      '''
      if not isinstance(obj, the_types):
          raise KittyException('object type (%s) is not one of (%s)' % (type(obj), the_types))
docs: :param obj: object to assert
      :param the_types: iterable of types, or a signle type
      :raise: an exception if obj is not an instance of types