docs: def get_entire_style_ranges(self, split_comments=None, **kwargs):
          """Find sections of the segment that have the same style value.
  
          The arguments to this function are used as a mask for the style to
          determine where to split the styles. Style bits that aren't included in
          the list will be ignored when splitting. The returned list covers the
          entire length of the segment.
  
          Returns a list of tuples, each tuple containing two items: a start, end
          tuple; and an integer with the style value.
          """
          style_bits = self.get_style_bits(**kwargs)
          matches = self.get_comment_locations(**kwargs)
          groups = np.split(matches, np.where(np.diff(matches) != 0)[0] + 1)
          if split_comments is None:
              split_comments = []
          # print groups
          # split into groups with the same numbers
          ranges = []
          last_end = 0
          if len(groups) == 1 and len(groups[0]) == 0:
              # check for degenerate case
              return
          last_style = -1
          for group in groups:
              # each group is guaranteed to have the same style
              size = len(group)
              next_end = last_end + size
              style = matches[last_end]
              masked_style = style & style_bits
              # print last_end, next_end, style, masked_style, size, group
              if style & comment_bit_mask:
                  if masked_style in split_comments:
                      # print "interesting comment", last_end, next_end
                      ranges.append(((last_end, next_end), masked_style))
                  else:
                      # print "non-interesting comment", last_end, next_end
                      if last_style == masked_style:
                          ((prev_end, _), _) = ranges.pop()
                          ranges.append(((prev_end, next_end), masked_style))
                      else:
                          ranges.append(((last_end, next_end), masked_style))
              else:
                  if last_style == masked_style:
                      ((prev_end, _), _) = ranges.pop()
                      ranges.append(((prev_end, next_end), masked_style))
                  else:
                      ranges.append(((last_end, next_end), masked_style))
              last_style = masked_style
              last_end = next_end
          return ranges