code: def testConstruct(self):
      statistics_artifact1 = standard_artifacts.ExampleStatistics()
      statistics_artifact1.split_names = (
          artifact_utils.encode_split_names(["train", "eval"])
      )
      statistics_artifact2 = standard_artifacts.ExampleStatistics()
      statistics_artifact2.split_names = (
          artifact_utils.encode_split_names(["train", "eval"])
      )
      include_splits = [("eval", "train")]
      config = text_format.Parse(
          """
        default_slice_config {
          num_examples_comparator {
            min_fraction_threshold: 1.0
          }
        }
      """,
          distribution_validator_pb2.DistributionValidatorConfig(),
      )
      distribution_validator = component.DistributionValidator(
          statistics=channel_utils.as_channel([statistics_artifact1]),
          baseline_statistics=channel_utils.as_channel(
              [statistics_artifact2]
          ),
          config=config,
          include_split_pairs=include_splits,
      )
      self.assertEqual(
          standard_artifacts.ExampleAnomalies.TYPE_NAME,
          distribution_validator.outputs[
              standard_component_specs.ANOMALIES_KEY
          ].type_name,
      )
      self.assertEqual(
          distribution_validator.spec.exec_properties[
              standard_component_specs.INCLUDE_SPLIT_PAIRS_KEY
          ],
          '[["eval", "train"]]',
      )
      restored_config = distribution_validator.exec_properties[
          standard_component_specs.DISTRIBUTION_VALIDATOR_CONFIG_KEY
      ]
      self.assertEqual(config, restored_config)
  
file_path: tfx/tfx/components/distribution_validator/component_test.py
imports: import tensorflow
  from tfx.components.distribution_validator import component
  from tfx.proto import distribution_validator_pb2
  from tfx.types import artifact_utils
  from tfx.types import channel_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from google.protobuf import text_format
label_desc: Use image node_id 1 for calling the DistributionValidatorTest obj's underlying member method code with example usage: obj.testConstruct() without return types