code: def _validate_pianoroll(pianoroll):
      
      if not isinstance(pianoroll, np.ndarray):
          raise TypeError("`pianoroll` must be of np.ndarray type.")
      if not (np.issubdtype(pianoroll.dtype, np.bool_)
              or np.issubdtype(pianoroll.dtype, np.number)):
          raise TypeError("The data type of `pianoroll` must be np.bool_ or a "
                          "subdtype of  np.number.")
      if pianoroll.ndim != 2:
          raise ValueError("`pianoroll` must have exactly two dimensions.")
      if pianoroll.shape[1] != 128:
          raise ValueError("The length of the second axis of `pianoroll` must be "
                           "128.")
docs: Raise an error if the input array is not a standard pianoroll.