code: def validate(ref_voicing, ref_cent, est_voicing, est_cent):
      
      if ref_cent.size == 0:
          warnings.warn("Reference frequency array is empty.")
      if est_cent.size == 0:
          warnings.warn("Estimated frequency array is empty.")
      # Make sure they're the same length
      if ref_voicing.shape[0] != ref_cent.shape[0] or \
         est_voicing.shape[0] != est_cent.shape[0] or \
         ref_cent.shape[0] != est_cent.shape[0]:
          raise ValueError('All voicing and frequency arrays must have the '
                           'same length.')
docs: Checks that voicing and frequency arrays are well-formed.  To be used in
      conjunction with :func:`mir_eval.melody.validate_voicing`
  
      Parameters
      ----------
      ref_voicing : np.ndarray
          Reference boolean voicing array
      ref_cent : np.ndarray
          Reference pitch sequence in cents
      est_voicing : np.ndarray
          Estimated boolean voicing array
      est_cent : np.ndarray
          Estimate pitch sequence in cents