class_docstr: A DoFn that extracts slice keys in batch.
class_docstr_tok: ["A","DoFn","that","extracts","slice","keys","in","batch","."]
code: def __init__(self, eval_config: config_pb2.EvalConfig):
      self._eval_config = eval_config
      self._sqls = [
          """
          SELECT
            ARRAY(
              {}
            ) as slice_key
          FROM Examples as example;""".format(
              spec.slice_keys_sql
          )
          for spec in eval_config.slicing_specs
          if spec.slice_keys_sql
      ]
      self._sql_slicer_num_record_batch_schemas = (
          beam.metrics.Metrics.distribution(
              constants.METRICS_NAMESPACE,
              "sql_slicer_num_record_batch_schemas",
          )
      )
  
imports: import copy
  import functools
  from typing import List, Mapping
  import apache_beam
  import pyarrow
  import tensorflow
  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
  from tfx_bsl.arrow import sql_util
  from tfx_bsl.tfxio import tensor_to_arrow
label_desc: Use image node_id 1 to create a new ExtractSqlSliceKeyFn object from inherited base classes: beam with example: obj = ExtractSqlSliceKeyFn(eval_config)