code: def binarize(self, threshold=0):
          
          if not self.is_binarized():
              self.pianoroll = (self.pianoroll > threshold)
docs: Binarize the pianoroll.
  
          Parameters
          ----------
          threshold : int or float
              A threshold used to binarize the pianorolls. Defaults to zero.