code: def testTotalAbsoluteAttributionsWithMultiModelsAndOutputs(
      self, model_name, output_name, examples, expected_values
  ):
      computations = (
          attributions.TotalAbsoluteAttributions().computations(
              model_names=[model_name],
              output_names=[output_name],
              example_weighted=True,
          )
      )
  
      with beam.Pipeline() as pipeline:
          # pylint: disable=no-value-for-parameter
          result = (
              pipeline
              | "Create" >> beam.Create(examples)
              | "Process"
              >> beam.Map(metric_util.to_standard_metric_inputs)
              | "AddSlice" >> beam.Map(lambda x: ((), x))
              | "CombineAttributions"
              >> beam.CombinePerKey(computations[0].combiner)
              | "ComputeResult"
              >> beam.Map(  # comment to add lamda on own line
                  lambda x: (x[0], computations[1].result(x[1]))
              )
          )
  
          # pylint: enable=no-value-for-parameter
  
          def check_result(got):
              try:
                  self.assertLen(got, 1)
                  got_slice_key, got_attributions = got[0]
                  self.assertEqual(got_slice_key, ())
                  total_attributions_key = metric_types.AttributionsKey(
                      name="total_absolute_attributions",
                      model_name=model_name,
                      output_name=output_name,
                      example_weighted=True,
                  )
                  self.assertIn(
                      total_attributions_key, got_attributions
                  )
                  self.assertDictElementsAlmostEqual(
                      got_attributions[total_attributions_key],
                      expected_values,
                  )
  
              except AssertionError as err:
                  raise util.BeamAssertException(err)
  
          util.assert_that(result, check_result, label="result")
  
file_path: model-analysis/tensorflow_model_analysis/metrics/attributions_test.py
imports: 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.metrics import attributions
  from tensorflow_model_analysis.metrics import metric_specs
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
label_desc: Use image node_id 6 for calling the AttributionsTest obj's underlying member method code with example usage: obj.testTotalAbsoluteAttributionsWithMultiModelsAndOutputs(model_name, output_name, examples, expected_values) without return types