code: def testEncode(self):
      encoder = music_encoders.TextMelodyEncoder(
          steps_per_quarter=4, min_pitch=21, max_pitch=108
      )
  
      ids = encoder.encode("60 -2 62 -1 64 -2")
      expected_ids = [
          43,  # ON(60)
          2,  # HOLD(60)
          45,  # ON(62)
          3,  # OFF(62)
          47,  # ON(64)
          2,  # HOLD(64)
      ]
  
      self.assertEqual(expected_ids, ids)
  
imports: import tempfile
  from magenta.models.score2perf import music_encoders
  import note_seq
  from note_seq import testing_lib
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the TextMelodyEncoderTest obj's underlying member method code with example usage: obj.testEncode() without return types