code: def _add_ci_derived_metrics(
      sliced_metrics: Tuple[
          slicer.SliceKeyType, metric_types.MetricsDict
      ],
      computations: List[metric_types.CIDerivedMetricComputation],
  ) -> Tuple[slicer.SliceKeyType, metric_types.MetricsDict]:
      """PTransform to compute CI derived metrics.
  
      Args:
        sliced_metrics: A PCollection of per-slice MetricsDicts containing the
          metrics to be used as inputs for ci-derived metrics.
        computations: List of CIDerivedMetricComputation.
  
      Returns:
        PCollection of sliced dict of metrics updated with ci-derived metrics.
      """
      slice_key, metrics = sliced_metrics
      result = copy.copy(metrics)
      for c in computations:
          result.update(c.result(result))
      return slice_key, result
  
imports: import copy
  import datetime
  import itertools
  import numbers
  from typing import Any, Dict, Iterable, Iterator, List, NamedTuple, Optional, Tuple, Type, TypeVar, Union
  import apache_beam
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.evaluators import counter_util
  from tensorflow_model_analysis.evaluators import eval_saved_model_util
  from tensorflow_model_analysis.evaluators import evaluator
  from tensorflow_model_analysis.evaluators import jackknife
  from tensorflow_model_analysis.evaluators import keras_util
  from tensorflow_model_analysis.evaluators import metrics_validator
  from tensorflow_model_analysis.evaluators import poisson_bootstrap
  from tensorflow_model_analysis.extractors import slice_key_extractor
  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.slicer import slicer_lib
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_model_analysis.utils import util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 11 for calling a global function with example usage: _add_ci_derived_metrics(sliced_metrics, computations) and returns: slice_key,  result