code: def empty_beat_rate(pianoroll, beat_resolution):
      
      _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)
docs: Return the ratio of empty beats to the total number of beats in a
      pianoroll.