code: def _process_partition(
      partition: Tuple[Tuple[types.SliceKey, int], pa.RecordBatch],
      stats_fn: PartitionedStatsFn,
  ) -> Tuple[types.SliceKey, statistics_pb2.DatasetFeatureStatistics]:
      """Process batch in a single partition."""
      (slice_key, _), record_batch = partition
      return slice_key, stats_fn.compute(record_batch)
  
imports: import collections
  import functools
  from typing import Dict, Iterable, Text, Tuple
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import table_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: _process_partition(partition, stats_fn) and returns: slice_key,  stats_fn