code: def test_write_stats_text_invalid_stats_input(self):
      with self.assertRaisesRegex(
          TypeError, ".*should be a DatasetFeatureStatisticsList proto."
      ):
          _ = stats_util.write_stats_text({}, "stats.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
  import numpy
  import tensorflow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.utils import stats_util
  from google.protobuf import text_format
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 10 for calling the StatsUtilTest obj's underlying member method code with example usage: obj.test_write_stats_text_invalid_stats_input() without return types