code: def test_write_load_anomalies_text(self):
      anomalies = text_format.Parse(
          """
               anomaly_info {
                 key: "feature_1"
                 value {
                    description: "Examples contain values missing from the "
                      "schema."
                    severity: ERROR
                    short_description: "Unexpected string values"
                    reason {
                      type: ENUM_TYPE_UNEXPECTED_STRING_VALUES
                      short_description: "Unexpected string values"
                      description: "Examples contain values missing from the "
                        "schema."
                    }
                  }
                }""",
          anomalies_pb2.Anomalies(),
      )
      anomalies_path = os.path.join(
          FLAGS.test_tmpdir, "anomalies.pbtxt"
      )
      anomalies_util.write_anomalies_text(
          anomalies=anomalies, output_path=anomalies_path
      )
      loaded_anomalies = anomalies_util.load_anomalies_text(
          input_path=anomalies_path
      )
      self.assertEqual(anomalies, loaded_anomalies)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl import flags
  from absl.testing import absltest
  from absl.testing import parameterized
  import pyarrow
  from tensorflow_data_validation.utils import anomalies_util
  from google.protobuf import text_format
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import anomalies_pb2
label_desc: Use image node_id 5 for calling the AnomaliesUtilTest obj's underlying member method code with example usage: obj.test_write_load_anomalies_text() without return types