<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def binarize(self, threshold=0):
 """ Binarize the pianoroll. Parameters threshold : int or float A threshold used to binarize the pianorolls. Defaults to zero. """

        if not self.is_binarized():
            self.pianoroll = (self.pianoroll > threshold)