code: def trim_trailing_silence(obj):
      
      _check_supported(obj)
      copied = deepcopy(obj)
      length = copied.get_active_length()
      copied.pianoroll = copied.pianoroll[:length]
      return copied
docs: Return a copy of the object with trimmed trailing silence of the
      piano-roll(s).