class_docstr: Converts to/from multiple-instrument metric performances.
  
  Attributes:
    num_velocity_bins: Number of velocity bins.
    max_tensors_per_notesequence: The maximum number of outputs to return
        for each NoteSequence.
    hop_size_bars: How many bars each sequence should be.
    chunk_size_bars: Chunk size used for hierarchically decomposing sequence.
    steps_per_quarter: Number of time steps per quarter note.
    quarters_per_bar: Number of quarter notes per bar.
    min_num_instruments: Minimum number of instruments per sequence.
    max_num_instruments: Maximum number of instruments per sequence.
    min_total_events: Minimum total length of all performance tracks, in events.
    max_events_per_instrument: Maximum length of a single-instrument
        performance, in events.
    first_subsequence_only: If True, only use the very first hop and discard all
        sequences longer than the hop size.
    chord_encoding: An instantiated OneHotEncoding object to use for encoding
        chords on which to condition, or None if not conditioning on chords.
    drop_tracks_and_truncate: Randomly drop extra tracks and truncate the event
        sequence.
class_docstr_tok: ["Converts","to\/from","multiple-instrument","metric","performances",".","Attributes",":","num_velocity_bins",":","Number","of","velocity","bins",".","max_tensors_per_notesequence",":","The","maximum","number","of","outputs","to","return","for","each","NoteSequence",".","hop_size_bars",":","How","many","bars","each","sequence","should","be",".","chunk_size_bars",":","Chunk","size","used","for","hierarchically","decomposing","sequence",".","steps_per_quarter",":","Number","of","time","steps","per","quarter","note",".","quarters_per_bar",":","Number","of","quarter","notes","per","bar",".","min_num_instruments",":","Minimum","number","of","instruments","per","sequence",".","max_num_instruments",":","Maximum","number","of","instruments","per","sequence",".","min_total_events",":","Minimum","total","length","of","all","performance","tracks",",","in","events",".","max_events_per_instrument",":","Maximum","length","of","a","single-instrument","performance",",","in","events",".","first_subsequence_only",":","If","True",",","only","use","the","very","first","hop","and","discard","all","sequences","longer","than","the","hop","size",".","chord_encoding",":","An","instantiated","OneHotEncoding","object","to","use","for","encoding","chords","on","which","to","condition",",","or","None","if","not","conditioning","on","chords",".","drop_tracks_and_truncate",":","Randomly","drop","extra","tracks","and","truncate","the","event","sequence","."]
code: def to_tensors(self, item):
      note_sequence = item
      return data.split_process_and_combine(
          note_sequence,
          self._presplit_on_time_changes,
          self.max_tensors_per_notesequence,
          self.is_training,
          self._to_tensors_fn,
      )
  
imports: import abc
  import random
  from magenta.models.music_vae import data
  from magenta.pipelines import performance_pipeline
  import note_seq
  from note_seq import chords_lib
  from note_seq import performance_lib
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the MultiInstrumentPerformanceConverter obj's underlying member method code with example usage: obj.to_tensors(item) and returns: data