code: def seg(reference_intervals, estimated_intervals):
      
  
      return min(underseg(reference_intervals, estimated_intervals),
                 overseg(reference_intervals, estimated_intervals))
docs: Compute the MIREX 'MeanSeg' score.
  
      Examples
      --------
      >>> (ref_intervals,
      ...  ref_labels) = mir_eval.io.load_labeled_intervals('ref.lab')
      >>> (est_intervals,
      ...  est_labels) = mir_eval.io.load_labeled_intervals('est.lab')
      >>> score = mir_eval.chord.seg(ref_intervals, est_intervals)
  
      Parameters
      ----------
      reference_intervals : np.ndarray, shape=(n, 2), dtype=float
          Reference chord intervals to score against.
      estimated_intervals : np.ndarray, shape=(m, 2), dtype=float
          Estimated chord intervals to score against.
  
      Returns
      -------
      segmentation score : float
          Comparison score, in [0.0, 1.0], where 1.0 means perfect segmentation.