def METHOD_NAME(self):
    class Model1(keras.Model):
        pass
    class Model2(Model1):
        def call(self, x):
            return 2 * x
    model = Model2()
    model_class = model.__class__.__bases__[0].__bases__[0]
    self._check_model_class(model_class)
    self._check_layer_class(model)