code: def _total_attributions_computations(
      absolute: bool = True,
      name: str = "",
      eval_config: Optional[config_pb2.EvalConfig] = None,
      model_name: str = "",
      output_name: str = "",
      sub_key: Optional[metric_types.SubKey] = None,
      example_weighted: bool = False,
  ) -> metric_types.MetricComputations:
      """Returns metric computations for total attributions.
  
      Args:
        absolute: True to use absolute value when summing.
        name: Metric name.
        eval_config: Eval config.
        model_name: Optional model name (if multi-model evaluation).
        output_name: Optional output name (if multi-output model type).
        sub_key: Optional sub key.
        example_weighted: True if example weights should be applied.
      """
      if not name:
          if absolute:
              name = "_" + TOTAL_ABSOLUTE_ATTRIBUTIONS_NAME
          else:
              name = "_" + TOTAL_ATTRIBUTIONS_NAME
      key = metric_types.AttributionsKey(
          name=name,
          model_name=model_name,
          output_name=output_name,
          sub_key=sub_key,
          example_weighted=example_weighted,
      )
      return [
          metric_types.MetricComputation(
              keys=[key],
              preprocessors=[
                  metric_types.AttributionPreprocessor(feature_keys={})
              ],
              combiner=_TotalAttributionsCombiner(
                  key, eval_config, absolute
              ),
          )
      ]
  
imports: import functools
  from typing import Any, Dict, Iterable, List, Optional, Union
  import apache_beam
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.metrics import example_count
  from tensorflow_model_analysis.metrics import metric_specs
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import util
label_desc: Use image node_id 4 for calling a global function with example usage: _total_attributions_computations(absolute, name, eval_config, model_name, output_name, sub_key, example_weighted) and returns: list