code: def _config_to_kwargs(config: example_diff_pb2.ExampleDiffConfig):
      """Convert ExampleDiffConfig to DetectFeatureSkewImpl kwargs."""
      kwargs = {}
      if not config.HasField("paired_example_skew"):
          raise ValueError(
              "ExampleDiffConfig missing required paired_example_skew."
          )
      kwargs["identifier_features"] = list(
          config.paired_example_skew.identifier_features
      )
      kwargs["features_to_ignore"] = list(
          config.paired_example_skew.ignore_features
      )
      kwargs[
          "sample_size"
      ] = config.paired_example_skew.skew_sample_size
      kwargs[
          "float_round_ndigits"
      ] = config.paired_example_skew.float_round_ndigits
      kwargs[
          "allow_duplicate_identifiers"
      ] = config.paired_example_skew.allow_duplicate_identifiers
      # TODO(b/227361696): Add better unit tests here. This will require generating
      # a new dataset for test purposes.
      kwargs["confusion_configs"] = _get_confusion_configs(config)
      return kwargs
  
imports: import os
  from typing import Any, Dict, List
  from absl import logging
  import apache_beam
  import tensorflow
  from tensorflow_data_validation.skew import feature_skew_detector
  from tfx import types
  from tfx.components.util import tfxio_utils
  from tfx.dsl.components.base import base_beam_executor
  from tfx.proto import example_diff_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import json_utils
  from tfx_bsl.tfxio import record_based_tfxio
label_desc: Use image node_id 3 for calling a global function with example usage: _config_to_kwargs(config) and returns: kwargs