def is_sequence_start_page(self, url):
        """
        Does this URL represent the first page in a section sequence? E.g.
        /courses/{coursename}/courseware/{block_id}/{section_id}/1
        This will return the same page as the pattern
        /courses/{coursename}/courseware/{block_id}/{section_id}.
        """
        return (
            len(url.path.segments) == 6 and
            url.path.segments[0] == 'courses' and
            url.path.segments[2] == 'courseware' and
            url.path.segments[5] == '1'
        )
Does this URL represent the first page in a section sequence? E.g.
        /courses/{coursename}/courseware/{block_id}/{section_id}/1
        This will return the same page as the pattern
        /courses/{coursename}/courseware/{block_id}/{section_id}.