Thrown when the provided annotations are not valid.
"""
// If reference or estimated onsets are empty, warn because metric will be 0
if reference_onsets.size == 0:
warnings.warn("Reference onsets are empty.")
if estimated_onsets.size == 0:
warnings.warn("Estimated onsets are empty.")
for onsets in [reference_onsets, estimated_onsets]:
util.validate_events(onsets, MAX_TIME)