parameters: (cls, version_body)
return_statement: return [CategoryContent(title_match.group(1), title_line,
                                  body, body_line)
                  for title_match, title_line, body, body_line
                  in zip(title_matches, title_lines, bodies, body_lines)]
docstring: A category title is a line with the title in column 0.
docstring_summary: A category title is a line with the title in column 0.
docstring_tokens: A category title is a line with the title in column 0 .
function: def split_categories(cls, version_body):
          """A category title is a line with the title in column 0."""
          if not version_body:
              return []
          title_matches = list(re.finditer(cls._category_title_re, version_body))
          if not title_matches or title_matches[0].start() != 0:
              # There is junk before the first category.
              raise CategoryParseError(0, 'Junk found where category expected')
          title_starts = [m.start(1) for m in title_matches]
          body_starts = [m.end(0) for m in title_matches]
          body_ends = title_starts[1:] + [len(version_body)]
          bodies = [version_body[body_start:body_end].rstrip(b'\n') + b'\n'
                    for (body_start, body_end) in zip(body_starts, body_ends)]
          title_lines = [version_body[:pos].count(b'\n') for pos in title_starts]
          body_lines = [version_body[:pos].count(b'\n') for pos in body_starts]
          return [CategoryContent(title_match.group(1), title_line,
                                  body, body_line)
                  for title_match, title_line, body, body_line
                  in zip(title_matches, title_lines, bodies, body_lines)]
function_tokens: def split_categories ( cls , version_body ) : if not version_body : return [ ] title_matches = list ( re . finditer ( cls . _category_title_re , version_body ) ) if not title_matches or title_matches [ 0 ] . start ( ) != 0 : # There is junk before the first category. raise CategoryParseError ( 0 , 'Junk found where category expected' ) title_starts = [ m . start ( 1 ) for m in title_matches ] body_starts = [ m . end ( 0 ) for m in title_matches ] body_ends = title_starts [ 1 : ] + [ len ( version_body ) ] bodies = [ version_body [ body_start : body_end ] . rstrip ( b'\n' ) + b'\n' for ( body_start , body_end ) in zip ( body_starts , body_ends ) ] title_lines = [ version_body [ : pos ] . count ( b'\n' ) for pos in title_starts ] body_lines = [ version_body [ : pos ] . count ( b'\n' ) for pos in body_starts ] return [ CategoryContent ( title_match . group ( 1 ) , title_line , body , body_line ) for title_match , title_line , body , body_line in zip ( title_matches , title_lines , bodies , body_lines ) ]