code: def validate(reference_beats, estimated_beats):
      
      # If reference or estimated beats are empty,
      # warn because metric will be 0
      if reference_beats.size == 0:
          warnings.warn("Reference beats are empty.")
      if estimated_beats.size == 0:
          warnings.warn("Estimated beats are empty.")
      for beats in [reference_beats, estimated_beats]:
          util.validate_events(beats, MAX_TIME)
docs: Checks that the input annotations to a metric look like valid beat time
      arrays, and throws helpful errors if not.
  
      Parameters
      ----------
      reference_beats : np.ndarray
          reference beat times, in seconds
      estimated_beats : np.ndarray
          estimated beat times, in seconds