code: def test_train_and_eval(self):
      data_dir = tf.compat.v1.test.get_temp_dir()
      data_file = os.path.join(data_dir, "elwc.tfrecord")
      if tf.io.gfile.exists(data_file):
          tf.io.gfile.remove(data_file)
  
      with tf.io.TFRecordWriter(data_file) as writer:
          for elwc in [ELWC] * 10:
              writer.write(elwc.SerializeToString())
  
      model_dir = os.path.join(data_dir, "model")
  
      with flagsaver.flagsaver(
          train_input_pattern=data_file,
          eval_input_pattern=data_file,
          model_dir=model_dir,
          num_train_steps=10,
          list_size=2,
      ):
          pipeline_example.train_and_eval()
  
      if tf.io.gfile.exists(model_dir):
          tf.io.gfile.rmtree(model_dir)
  
file_path: ranking/tensorflow_ranking/extension/examples/pipeline_example_test.py
imports: import os
  from absl import flags
  from absl.testing import flagsaver
  import tensorflow
  from google.protobuf import text_format
  from tensorflow_ranking.extension.examples import pipeline_example
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 1 for calling the PipelineExampleTest obj's underlying member method code with example usage: obj.test_train_and_eval() without return types