code: def validate(reference_labels, estimated_labels):
      
      N = len(reference_labels)
      M = len(estimated_labels)
      if N != M:
          raise ValueError(
              "Chord comparison received different length lists: "
              "len(reference)=%d\tlen(estimates)=%d" % (N, M))
      for labels in [reference_labels, estimated_labels]:
          for chord_label in labels:
              validate_chord_label(chord_label)
      # When either label list is empty, warn the user
      if len(reference_labels) == 0:
          warnings.warn('Reference labels are empty')
      if len(estimated_labels) == 0:
          warnings.warn('Estimated labels are empty')
docs: Checks that the input annotations to a comparison function look like
      valid chord labels.
  
      Parameters
      ----------
      reference_labels : list, len=n
          Reference chord labels to score against.
      estimated_labels : list, len=n
          Estimated chord labels to score against.