code: def _add_output_layers(
      base_model: Model,
      outputs: int,
      drop_out: Union[float, None] = None,
      name: Optional[str] = None,
  ) -> Model:
      x = base_model.output
      if drop_out:
          x = tf.keras.layers.Dropout(drop_out)(x)
      x = tf.keras.layers.Dense(outputs, name="output")(x)
  
      model = tf.keras.Model(base_model.input, x, name=name)
      return model
  
imports: import inspect
  from functools import partial
  from typing import Any, List, Optional, Union
  import matplotlib.cm
  import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorflow_addons
  from PIL import Image
  from tensorflow import keras
  from tensorflow.keras.models import Model
  from tf_keras_vis.gradcam import Gradcam, GradcamPlusPlus
  from tf_keras_vis.utils import normalize
  from typeguard import check_argument_types, typechecked
  from chitra.import_utils import is_installed
  from .datagenerator import Dataset
label_desc: Use image node_id 2 for calling a global function with example usage: _add_output_layers(base_model, outputs, drop_out, name) and returns: model