@classmethod<EOL><INDENT>def _join_paragraphs(cls, lines, use_indent=False, leading_blanks=False, trailing_blanks=False):<DEDENT>
curr_para = []<EOL>paragraphs = []<EOL>for line in lines:<EOL><INDENT>if use_indent:<EOL><INDENT>if line.startswith('<STR_LIT:U+0020>'):<EOL><INDENT>curr_para.append(line.lstrip())<EOL>continue<EOL><DEDENT>elif line == '<STR_LIT>':<EOL><INDENT>continue<EOL><DEDENT>else:<EOL><INDENT>if len(curr_para) > <NUM_LIT:0>:<EOL><INDENT>paragraphs.append(cls._join_paragraph(curr_para, leading_blanks, trailing_blanks))<EOL><DEDENT>curr_para = [line.lstrip()]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if len(line) != <NUM_LIT:0>:<EOL><INDENT>curr_para.append(line)<EOL><DEDENT>else:<EOL><INDENT>paragraphs.append(cls._join_paragraph(curr_para, leading_blanks, trailing_blanks))<EOL>curr_para = []<EOL><DEDENT><DEDENT><DEDENT>if len(curr_para) > <NUM_LIT:0>:<EOL><INDENT>paragraphs.append(cls._join_paragraph(curr_para, leading_blanks, trailing_blanks))<EOL><DEDENT>return paragraphs<EOL>
Join adjacent lines together into paragraphs using either a blank line or indent as separator.