code: def n_pitche_classes_used(pianoroll):
      
      _validate_pianoroll(pianoroll)
      chroma = _to_chroma(pianoroll)
      return np.count_nonzero(np.any(chroma, 0))
docs: Return the number of unique pitch classes used in a pianoroll.