code: def plot_subclassed_model():
      class MyModel(keras.Model):
          def __init__(self, **kwargs):
              super().__init__(**kwargs)
              self.dense_1 = keras.layers.Dense(3, activation="relu")
              self.dense_2 = keras.layers.Dense(1, activation="sigmoid")
  
          def call(self, x):
              return self.dense_2(self.dense_1(x))
  
      model = MyModel()
      model.build((None, 3))
  
      plot_model(model, "subclassed.png")
      plot_model(model, "subclassed-show_shapes.png", show_shapes=True)
      plot_model(
          model,
          "subclassed-show_shapes-show_dtype.png",
          show_shapes=True,
          show_dtype=True,
      )
      plot_model(
          model,
          "subclassed-show_shapes-show_dtype-show_layer_names.png",
          show_shapes=True,
          show_dtype=True,
          show_layer_names=True,
      )
      plot_model(
          model,
          "subclassed-show_shapes-show_dtype-show_layer_names-show_layer_activations.png",  # noqa: E501
          show_shapes=True,
          show_dtype=True,
          show_layer_names=True,
          show_layer_activations=True,
      )
      plot_model(
          model,
          "subclassed-show_shapes-show_dtype-show_layer_names-show_layer_activations-show_trainable.png",  # noqa: E501
          show_shapes=True,
          show_dtype=True,
          show_layer_names=True,
          show_layer_activations=True,
          show_trainable=True,
      )
      plot_model(
          model,
          "subclassed-show_shapes-show_dtype-show_layer_names-show_layer_activations-show_trainable-LR.png",  # noqa: E501
          show_shapes=True,
          show_dtype=True,
          show_layer_names=True,
          show_layer_activations=True,
          show_trainable=True,
          rankdir="LR",
      )
      plot_model(
          model,
          "subclassed-show_layer_activations-show_trainable.png",
          show_layer_activations=True,
          show_trainable=True,
      )
      plot_model(
          model,
          "subclassed-show_shapes-show_layer_activations-show_trainable.png",
          show_shapes=True,
          show_layer_activations=True,
          show_trainable=True,
      )
  
imports: import keras
  from keras.utils import plot_model
label_desc: Use image node_id 3 for calling a global function with example usage: plot_subclassed_model() and returns: self