<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def seg(reference_intervals, estimated_intervals):
 """Compute the MIREX 'MeanSeg' score. Examples -------- 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. """


    return min(underseg(reference_intervals, estimated_intervals),
               overseg(reference_intervals, estimated_intervals))