code: def testToNoteSequenceWithChords(self):
      sequence = copy.deepcopy(self.sequence)
      testing_lib.add_track_to_sequence(
          sequence,
          0,
          [
              (64, 100, 0, 2),
              (60, 100, 0, 4),
              (67, 100, 2, 4),
              (62, 100, 4, 6),
              (59, 100, 4, 8),
              (67, 100, 6, 8),
          ],
      )
      testing_lib.add_track_to_sequence(
          sequence,
          1,
          [
              (40, 100, 0, 0.125),
              (50, 100, 0, 0.125),
              (50, 100, 2, 2.125),
              (40, 100, 4, 4.125),
              (50, 100, 4, 4.125),
              (50, 100, 6, 6.125),
          ],
          is_drum=True,
      )
      testing_lib.add_chords_to_sequence(sequence, [("C", 0), ("G", 4)])
      converter = data_hierarchical.MultiInstrumentPerformanceConverter(
          hop_size_bars=2,
          chunk_size_bars=2,
          chord_encoding=note_seq.MajorMinorChordOneHotEncoding(),
      )
      tensors = converter.to_tensors(sequence)
      self.assertEqual(2, len(tensors.outputs))
      sequences = converter.from_tensors(
          tensors.outputs, tensors.controls
      )
      self.assertEqual(2, len(sequences))
  
      sequence1 = copy.deepcopy(self.sequence)
      testing_lib.add_track_to_sequence(
          sequence1,
          0,
          [(64, 100, 0, 2), (60, 100, 0, 4), (67, 100, 2, 4)],
      )
      testing_lib.add_track_to_sequence(
          sequence1,
          1,
          [
              (40, 100, 0, 0.125),
              (50, 100, 0, 0.125),
              (50, 100, 2, 2.125),
          ],
          is_drum=True,
      )
      testing_lib.add_chords_to_sequence(sequence1, [("C", 0)])
      self.assertProtoEquals(sequence1, sequences[0])
  
      sequence2 = copy.deepcopy(self.sequence)
      testing_lib.add_track_to_sequence(
          sequence2,
          0,
          [(62, 100, 0, 2), (59, 100, 0, 4), (67, 100, 2, 4)],
      )
      testing_lib.add_track_to_sequence(
          sequence2,
          1,
          [
              (40, 100, 0, 0.125),
              (50, 100, 0, 0.125),
              (50, 100, 2, 2.125),
          ],
          is_drum=True,
      )
      testing_lib.add_chords_to_sequence(sequence2, [("G", 0)])
      self.assertProtoEquals(sequence2, sequences[1])
  
file_path: magenta/magenta/models/music_vae/data_hierarchical_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  from magenta.models.music_vae import data_hierarchical
  import note_seq
  from note_seq import testing_lib
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the MultiInstrumentPerformanceConverterTest obj's underlying member method code with example usage: obj.testToNoteSequenceWithChords() without return types