code: def plot_nested_functional_model():
      inputs = keras.Input((3,))
      x = keras.layers.Dense(4, activation="relu")(inputs)
      x = keras.layers.Dense(4, activation="relu")(x)
      outputs = keras.layers.Dense(3, activation="relu")(x)
      inner_model = keras.Model(inputs, outputs)
  
      inputs = keras.Input((3,))
      x = keras.layers.Dense(3, activation="relu", trainable=False)(
          inputs
      )
      residual = x
      x = inner_model(x)
      x += residual
      residual = x
      x = keras.layers.Dense(4, activation="relu")(x)
      x = keras.layers.Dense(4, activation="relu")(x)
      x = keras.layers.Dense(3, activation="relu")(x)
      x += residual
      x = keras.layers.Dropout(0.5)(x)
      outputs = keras.layers.Dense(1, activation="sigmoid")(x)
      model = keras.Model(inputs, outputs)
  
      plot_model(model, "nested-functional.png", expand_nested=True)
      plot_model(
          model,
          "nested-functional-show_shapes.png",
          show_shapes=True,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-show_shapes-show_dtype.png",
          show_shapes=True,
          show_dtype=True,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-show_shapes-show_dtype-show_layer_names.png",
          show_shapes=True,
          show_dtype=True,
          show_layer_names=True,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-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,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-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,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-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",
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-show_layer_activations-show_trainable.png",
          show_layer_activations=True,
          show_trainable=True,
          expand_nested=True,
      )
      plot_model(
          model,
          "nested-functional-show_shapes-show_layer_activations-show_trainable.png",  # noqa: E501
          show_shapes=True,
          show_layer_activations=True,
          show_trainable=True,
          expand_nested=True,
      )
  
imports: import keras
  from keras.utils import plot_model
label_desc: Use image node_id 4 for calling a global function with example usage: plot_nested_functional_model() without return types