code: def append_track(self, track=None, pianoroll=None, program=0, is_drum=False,
                       name='unknown'):
          
          if track is not None:
              if not isinstance(track, Track):
                  raise TypeError("`track` must be a pypianoroll.Track instance.")
              track.check_validity()
          else:
              track = Track(pianoroll, program, is_drum, name)
          self.tracks.append(track)
docs: Append a multitrack.Track instance to the track list or create a new
          multitrack.Track object and append it to the track list.
  
          Parameters
          ----------
          track : pianoroll.Track
              A :class:`pypianoroll.Track` instance to be appended to the track
              list.
          pianoroll : np.ndarray, shape=(n_time_steps, 128)
              A pianoroll matrix. The first and second dimension represents time
              and pitch, respectively. Available datatypes are bool, int and
              float. Only effective when `track` is None.
          program: int
              A program number according to General MIDI specification [1].
              Available values are 0 to 127. Defaults to 0 (Acoustic Grand Piano).
              Only effective when `track` is None.
          is_drum : bool
              A boolean number that indicates whether it is a percussion track.
              Defaults to False. Only effective when `track` is None.
          name : str
              The name of the track. Defaults to 'unknown'. Only effective when
              `track` is None.
  
          References
          ----------
          [1] https://www.midi.org/specifications/item/gm-level-1-sound-set