code: def test_write_anomalies_text_invalid_anomalies_input(self):
      with self.assertRaisesRegex(
          TypeError, "should be an Anomalies proto"
      ):
          anomalies_util.write_anomalies_text({}, "anomalies.pbtxt")
  
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 6 for calling the AnomaliesUtilTest obj's underlying member method code with example usage: obj.test_write_anomalies_text_invalid_anomalies_input() without return types