code: def _createMultiClassClassificationModel(
      self, sequential=True, output_names=None, add_custom_metrics=False
  ):
      if not output_names:
          layer = tf.keras.layers.Input(shape=(5,), name="output")
          if sequential:
              model = tf.keras.models.Sequential([layer, layer])
          else:
              model = tf.keras.models.Model(layer, layer)
          if add_custom_metrics:
              model.add_metric(tf.reduce_sum(layer), name="custom")
          model.compile(
              loss=self._createMultiClassClassificationLosses(),
              metrics=self._createMultiClassClassificationMetrics(),
              weighted_metrics=self._createMultiClassClassificationMetrics(),
          )
          model.fit(
              np.array([[1, 0, 0, 0, 0]]), np.array([[1, 0, 0, 0, 0]])
          )
      else:
          layers_per_output = {}
          metrics_per_output = {}
          weighted_metrics_per_output = {}
          losses_per_output = {}
          for output_name in output_names:
              layers_per_output[output_name] = tf.keras.layers.Input(
                  shape=(5,), name=output_name
              )
              metrics_per_output[
                  output_name
              ] = self._createMultiClassClassificationMetrics()
              weighted_metrics_per_output[
                  output_name
              ] = self._createMultiClassClassificationMetrics()
              losses_per_output[
                  output_name
              ] = self._createMultiClassClassificationLosses()
          if sequential:
              raise ValueError(
                  "Sequential not supported with multi-output models"
              )
          else:
              model = tf.keras.models.Model(
                  layers_per_output, layers_per_output
              )
          if add_custom_metrics:
              for output_name in output_names:
                  model.add_metric(
                      tf.reduce_sum(layers_per_output[output_name]),
                      name="custom_" + output_name,
                  )
          model.compile(
              loss=losses_per_output,
              metrics=metrics_per_output,
              weighted_metrics=weighted_metrics_per_output,
          )
          model.fit(
              {n: np.array([[1, 0, 0, 0, 0]]) for n in output_names},
              {n: np.array([[1, 0, 0, 0, 0]]) for n in output_names},
          )
  
      export_path = tempfile.mkdtemp()
      model.save(export_path, save_format="tf")
      return export_path
  
imports: import tempfile
  import unittest
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.evaluators import keras_util
  from tensorflow_model_analysis.metrics import metric_types
label_desc: Use image node_id 6 for calling the KerasSavedModelUtilTest obj's underlying member method code with example usage: obj._createMultiClassClassificationModel(sequential, output_names, add_custom_metrics) and returns: export_path