code: def test_e2e(
      self,
      stats_options,
      expected_stats_pbtxt,
      expected_inferred_schema_pbtxt,
      schema_for_validation_pbtxt,
      expected_anomalies_pbtxt,
      expected_updated_schema_pbtxt,
  ):
      tfxio = tf_sequence_example_record.TFSequenceExampleRecord(
          self._input_file, ["tfdv", "test"]
      )
      stats_file = os.path.join(self._output_dir, "stats")
      with beam.Pipeline() as p:
          _ = (
              p
              | "TFXIORead" >> tfxio.BeamSource()
              | "GenerateStats"
              >> tfdv.GenerateStatistics(stats_options)
              | "WriteStats"
              >> tfdv.WriteStatisticsToTFRecord(stats_file)
          )
  
      actual_stats = tfdv.load_statistics(stats_file)
      test_util.make_dataset_feature_stats_list_proto_equal_fn(
          self,
          text_format.Parse(
              expected_stats_pbtxt,
              statistics_pb2.DatasetFeatureStatisticsList(),
          ),
      )([actual_stats])
      actual_inferred_schema = tfdv.infer_schema(
          actual_stats, infer_feature_shape=True
      )
  
      if hasattr(
          actual_inferred_schema, "generate_legacy_feature_spec"
      ):
          actual_inferred_schema.ClearField(
              "generate_legacy_feature_spec"
          )
      self._assert_schema_equal(
          actual_inferred_schema,
          text_format.Parse(
              expected_inferred_schema_pbtxt, schema_pb2.Schema()
          ),
      )
  
      schema_for_validation = text_format.Parse(
          schema_for_validation_pbtxt, schema_pb2.Schema()
      )
      actual_anomalies = tfdv.validate_statistics(
          actual_stats, schema_for_validation
      )
      actual_anomalies.ClearField("baseline")
      self.assertEqual(
          actual_anomalies,
          text_format.Parse(
              expected_anomalies_pbtxt, anomalies_pb2.Anomalies()
          ),
      )
  
      actual_updated_schema = tfdv.update_schema(
          schema_for_validation, actual_stats
      )
      self._assert_schema_equal(
          actual_updated_schema,
          text_format.Parse(
              expected_updated_schema_pbtxt, schema_pb2.Schema()
          ),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  from absl import flags
  from absl.testing import absltest
  from absl.testing import parameterized
  import apache_beam
  import tensorflow
  import tensorflow_data_validation
  from tensorflow_data_validation.utils import test_util
  from tfx_bsl.tfxio import tf_sequence_example_record
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 3 for calling the SequenceExampleStatsTest obj's underlying member method code with example usage: obj.test_e2e(stats_options, expected_stats_pbtxt, expected_inferred_schema_pbtxt, schema_for_validation_pbtxt, expected_anomalies_pbtxt, expected_updated_schema_pbtxt) without return types