code: def validate_intervals(ref_intervals, est_intervals):
      
      # 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)
docs: 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)