code: def testInvalidStatisticsError(self):
      class TestPipeline1(pipeline.Pipeline):
          def __init__(self):
              super(TestPipeline1, self).__init__(object, object)
              self.stats = []
  
          def transform(self, input_object):
              self._set_stats(
                  [statistics.Counter("counter_1", 5), 12345]
              )
              return []
  
      class TestPipeline2(pipeline.Pipeline):
          def __init__(self):
              super(TestPipeline2, self).__init__(object, object)
              self.stats = []
  
          def transform(self, input_object):
              self._set_stats(statistics.Counter("counter_1", 5))
              return [input_object]
  
      tp1 = TestPipeline1()
      with self.assertRaises(pipeline.InvalidStatisticsError):
          tp1.transform("hello")
  
      tp2 = TestPipeline2()
      with self.assertRaises(pipeline.InvalidStatisticsError):
          tp2.transform("hello")
  
imports: import os
  from absl.testing import absltest
  from magenta.common import testing_lib
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  import tensorflow.compat.v1
label_desc: Use image node_id 10 for calling the PipelineTest obj's underlying member method code with example usage: obj.testInvalidStatisticsError() and returns: list, list