<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_contour_labels(self, new_fig=True):
 """ Plots the labelled contours! """

        timestamps = []
        pitch = []

        if new_fig:
            p.figure()
        for interval, contours in self.contour_labels.items():
            for contour in contours:
                x = self.pitch_obj.timestamps[contour[0]:contour[1]]
                y = [interval]*len(x)
                timestamps.extend(x)
                pitch.extend(y)

        data = np.array([timestamps, pitch]).T
        data = np.array(sorted(data, key=lambda xx: xx[0]))
        p.plot(data[:, 0], data[:, 1], 'g-')