code: def _assert_equal_anomalies(
      self, actual_anomalies, expected_anomalies
  ):
      # Check if the actual anomalies matches with the expected anomalies.
      for feature_name in expected_anomalies:
          self.assertIn(feature_name, actual_anomalies.anomaly_info)
          # Do not compare diff_regions.
          actual_anomalies.anomaly_info[feature_name].ClearField(
              "diff_regions"
          )
  
          self.assertEqual(
              actual_anomalies.anomaly_info[feature_name],
              expected_anomalies[feature_name],
          )
      self.assertEqual(
          len(actual_anomalies.anomaly_info), len(expected_anomalies)
      )
  
imports: import os
  import tempfile
  from absl.testing import absltest
  from absl.testing import parameterized
  from tensorflow_data_validation.anomalies.proto import custom_validation_config_pb2
  from tfx.components.example_validator import executor
  from tfx.dsl.io import fileio
  from tfx.orchestration.experimental.core import component_generated_alert_pb2
  from tfx.orchestration.experimental.core import constants
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import json_utils
  from google.protobuf import any_pb2
  from google.protobuf import text_format
  from ml_metadata.proto import metadata_store_pb2
  from tensorflow_metadata.proto.v0 import anomalies_pb2
label_desc: Use image node_id 2 for calling the ExecutorTest obj's underlying member method code with example usage: obj._assert_equal_anomalies(actual_anomalies, expected_anomalies) without return types