code: def _ComputeJackknifeSample(  # pylint: disable=invalid-name
      sample_accumulators: beam.PCollection[
          confidence_intervals_util.SampleCombineFn.SampleAccumulator
      ],
      sample_id: int,
      computations_combine_fn: beam.CombineFn,
      derived_metrics_ptransform: beam.PTransform,
  ) -> beam.PCollection[confidence_intervals_util.SampleMetrics]:
      """Computes a single jackknife delete-d sample from partition accumulators.
  
      Args:
        sample_accumulators: A PCollections of combiner accumulators to be used for
          a given sample.
        sample_id: The sample_id to generate. This is used to determine which
          partition accumulators to skip.
        computations_combine_fn: a beam.CombineFn instance that takes input elements
          of type Extracts and returns a MetricsDict. This will be invoked as part
          of a CombinePerKey in which the key is a slice key.
        derived_metrics_ptransform: A PTransform which adds derived metrics to the
          results of the computations_combine_fn. This PTransform should both input
          and output a single PCollection with elements of type MetricsDict where
          the output MetricsDict includes additional derived metrics.
  
      Returns:
        A single sample tuple containing the sample_id and the metric dictionary for
        that sample
      """
  
      return (
          sample_accumulators
          | "MergePartitionsPerSlice"
          >> beam.CombinePerKey(
              _AccumulatorCombineFn(computations_combine_fn)
          )
          | "AddDerivedMetrics" >> derived_metrics_ptransform
          | "AddSampleIdToValue"
          >> beam.MapTuple(_add_sample_id, sample_id=sample_id)
      )
  
imports: from typing import Optional, Set, Tuple, TypeVar
  import apache_beam
  import numpy
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.evaluators import confidence_intervals_util
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import beam_util
label_desc: Use image node_id 2 for calling a global function with example usage: _ComputeJackknifeSample(sample_accumulators, sample_id, computations_combine_fn, derived_metrics_ptransform) and returns: unknown