class_docstr: A DoFn that extracts slice keys that apply per example.
class_docstr_tok: ["A","DoFn","that","extracts","slice","keys","that","apply","per","example","."]
code: def __init__(
      self,
      eval_config: Optional[config_pb2.EvalConfig],
      materialize: bool,
  ):
      self._eval_config = eval_config
      self._materialize = materialize
      self._duplicate_slice_keys_counter = beam.metrics.Metrics.counter(
          constants.METRICS_NAMESPACE,
          "num_examples_with_duplicate_slice_keys",
      )
  
file_path: model-analysis/tensorflow_model_analysis/extractors/slice_key_extractor.py
imports: import copy
  from typing import List, Optional
  import apache_beam
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import util
label_desc: Use image node_id 1 to create a new ExtractSliceKeysFn object from inherited base classes: beam with example: obj = ExtractSliceKeysFn(eval_config, materialize)