code: def binarize(obj, threshold=0):
      
      _check_supported(obj)
      copied = deepcopy(obj)
      copied.binarize(threshold)
      return copied
docs: Return a copy of the object with binarized piano-roll(s).
  
      Parameters
      ----------
      threshold : int or float
          Threshold to binarize the piano-roll(s). Default to zero.