<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def empty_beat_rate(pianoroll, beat_resolution):
 """Return the ratio of empty beats to the total number of beats in a pianoroll."""

    _validate_pianoroll(pianoroll)
    reshaped = pianoroll.reshape(-1, beat_resolution * pianoroll.shape[1])
    n_empty_beats = np.count_nonzero(reshaped.any(1))
    return n_empty_beats / len(reshaped)