code: def test_train_signature_def(self):
      with context.graph_mode():
          loss = {"my_loss": constant_op.constant([0])}
          predictions = {"output1": constant_op.constant(["foo"])}
          mean, update_op = metrics_module.mean_tensor(
              constant_op.constant([0])
          )
          metrics = {
              "metrics_1": (mean, update_op),
              "metrics_2": (
                  constant_op.constant([0]),
                  constant_op.constant([10]),
              ),
          }
  
          outputter = export_output_lib.TrainOutput(
              loss, predictions, metrics
          )
  
          receiver = {
              "features": constant_op.constant(100, shape=(100, 2)),
              "labels": constant_op.constant(100, shape=(100, 1)),
          }
          sig_def = outputter.as_signature_def(receiver)
  
          self.assertIn("loss/my_loss", sig_def.outputs)
          self.assertIn("metrics_1/value", sig_def.outputs)
          self.assertIn("metrics_2/value", sig_def.outputs)
          self.assertIn("predictions/output1", sig_def.outputs)
          self.assertIn("features", sig_def.inputs)
  
imports: from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.framework import types_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import metrics
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model.model_utils import export_output
label_desc: Use image node_id 6 for calling the SupervisedOutputTest obj's underlying member method code with example usage: obj.test_train_signature_def() without return types