<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def n_pitche_classes_used(pianoroll):
 """Return the number of unique pitch classes used in a pianoroll."""

    _validate_pianoroll(pianoroll)
    chroma = _to_chroma(pianoroll)
    return np.count_nonzero(np.any(chroma, 0))