code: def testGenerateExamples(self):
      ns = music_pb2.NoteSequence()
      testing_lib.add_track_to_sequence(
          ns,
          0,
          [
              (60, 100, 0.0, 1.0),
              (64, 100, 1.0, 2.0),
              (67, 127, 2.0, 3.0),
          ],
      )
      input_transform = beam.transforms.Create(
          [("0", ns.SerializeToString())]
      )
      output_dir = tempfile.mkdtemp()
      encoder = music_encoders.MidiPerformanceEncoder(
          steps_per_second=100,
          num_velocity_bins=32,
          min_pitch=21,
          max_pitch=108,
      )
  
      datagen_beam.generate_examples(
          input_transform=input_transform,
          output_dir=output_dir,
          problem_name="test_problem",
          splits={"train": 1.0},
          min_hop_size_seconds=3.0,
          max_hop_size_seconds=3.0,
          min_pitch=21,
          max_pitch=108,
          num_replications=1,
          encode_performance_fn=encoder.encode_note_sequence,
      )
  
file_path: magenta/magenta/models/score2perf/datagen_beam_test.py
imports: import tempfile
  from magenta.models.score2perf import music_encoders
  from note_seq import testing_lib
  from note_seq.protobuf import music_pb2
  import pytest
  import tensorflow.compat.v1
  from magenta.models.score2perf import datagen_beam
label_desc: Use image node_id 1 for calling the GenerateExamplesTest obj's underlying member method code with example usage: obj.testGenerateExamples() without return types