<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_intervals(ref_intervals, est_intervals):
 """Checks that the input annotations to a metric look like time intervals, and throws helpful errors if not. Parameters ref_intervals : np.ndarray, shape=(n,2) Array of reference notes time intervals (onset and offset times) est_intervals : np.ndarray, shape=(m,2) Array of estimated notes time intervals (onset and offset times) """

    # If reference or estimated notes are empty, warn
    if ref_intervals.size == 0:
        warnings.warn("Reference notes are empty.")
    if est_intervals.size == 0:
        warnings.warn("Estimated notes are empty.")

    # Validate intervals
    util.validate_intervals(ref_intervals)
    util.validate_intervals(est_intervals)