class_docstr: API for detecting feature skew between training and serving examples.
  
  Example:
  
  ```python
    with beam.Pipeline(runner=...) as p:
       training_examples = p | 'ReadTrainingData' >>
         beam.io.ReadFromTFRecord(
            training_filepaths, coder=beam.coders.ProtoCoder(tf.train.Example))
       serving_examples = p | 'ReadServingData' >>
         beam.io.ReadFromTFRecord(
            serving_filepaths, coder=beam.coders.ProtoCoder(tf.train.Example))
       _ = ((training_examples, serving_examples) | 'DetectFeatureSkew' >>
         DetectFeatureSkew(identifier_features=['id1'], sample_size=5)
       | 'WriteFeatureSkewResultsOutput' >>
         tfdv.WriteFeatureSkewResultsToTFRecord(output_path)
       | 'WriteFeatureSkwePairsOutput' >>
       tfdv.WriteFeatureSkewPairsToTFRecord(output_path))
  ```
  
  See the documentation for DetectFeatureSkewImpl for more detail about feature
  skew detection.
class_docstr_tok: ["API","for","detecting","feature","skew","between","training","and","serving","examples",".","Example",":","``","`","python","with","beam.Pipeline","(","runner=","...",")","as","p",":","training_examples","=","p","|","'ReadTrainingData","'",">",">","beam.io.ReadFromTFRecord","(","training_filepaths",",","coder=beam.coders.ProtoCoder","(","tf.train.Example",")",")","serving_examples","=","p","|","'ReadServingData","'",">",">","beam.io.ReadFromTFRecord","(","serving_filepaths",",","coder=beam.coders.ProtoCoder","(","tf.train.Example",")",")","_","=","(","(","training_examples",",","serving_examples",")","|","'DetectFeatureSkew","'",">",">","DetectFeatureSkew","(","identifier_features=","[","'id1","'","]",",","sample_size=5",")","|","'WriteFeatureSkewResultsOutput","'",">",">","tfdv.WriteFeatureSkewResultsToTFRecord","(","output_path",")","|","'WriteFeatureSkwePairsOutput","'",">",">","tfdv.WriteFeatureSkewPairsToTFRecord","(","output_path",")",")","``","`","See","the","documentation","for","DetectFeatureSkewImpl","for","more","detail","about","feature","skew","detection","."]
code: def expand(
      self,
      datasets: Tuple[beam.pvalue.PCollection, beam.pvalue.PCollection],
  ) -> Tuple[beam.pvalue.PCollection, beam.pvalue.PCollection]:
      result = (
          datasets
          | "DetectFeatureSkew"
          >> feature_skew_detector.DetectFeatureSkewImpl(
              self._identifier_features,
              self._features_to_ignore,
              self._sample_size,
              self._float_round_ndigits,
              self._allow_duplicate_identifiers,
          )
      )
      return (
          result[feature_skew_detector.SKEW_RESULTS_KEY],
          result[feature_skew_detector.SKEW_PAIRS_KEY],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  import logging
  from typing import Callable, Iterable, List, Optional, Text, Tuple, Set
  import apache_beam
  import pyarrow
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.anomalies.proto import custom_validation_config_pb2
  from tensorflow_data_validation.anomalies.proto import validation_config_pb2
  from tensorflow_data_validation.anomalies.proto import validation_metadata_pb2
  from tensorflow_data_validation.api import validation_options
  from tensorflow_data_validation.pywrap.tensorflow_data_validation_extension import validation
  from tensorflow_data_validation.skew import feature_skew_detector
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.statistics import stats_impl
  from tensorflow_data_validation.statistics import stats_options
  from tensorflow_data_validation.utils import anomalies_util
  from tensorflow_data_validation.utils import slicing_util
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling the DetectFeatureSkew obj's underlying member method code with example usage: obj.expand(datasets) and returns: result,  result