<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def trim_trailing_silence(self):
 """Trim the trailing silence of the pianoroll."""

        length = self.get_active_length()
        self.pianoroll = self.pianoroll[:length]