def get_intervals(self, sort=False):
for i in sorted(self.intervals) if sort else self.intervals:<EOL><INDENT>yield i<EOL><DEDENT>
Give all the intervals or points.

        :param bool sort: Flag for yielding the intervals or points sorted.
        :yields: All the intervals