code: def ensure_subclass(value, types):
      
      ensure_class(value)
      if not issubclass(value, types):
          raise TypeError(
              "expected subclass of {}, not {}".format(
                  types, value))
docs: Ensure value is a subclass of types
  
      >>> class Hello(object): pass
      >>> ensure_subclass(Hello, Hello)
      >>> ensure_subclass(object, Hello)
      Traceback (most recent call last):
      TypeError: