@internal<EOL><INDENT>@staticmethod<EOL>def _merge_statement_lists(stmsA: List["<STR_LIT>"], stmsB: List["<STR_LIT>"])-> List["<STR_LIT>"]:<DEDENT>
if stmsA is None and stmsB is None:<EOL><INDENT>return None<EOL><DEDENT>tmp = []<EOL>a_it = iter(stmsA)<EOL>b_it = iter(stmsB)<EOL>a = None<EOL>b = None<EOL>a_empty = False<EOL>b_empty = False<EOL>while not a_empty and not b_empty:<EOL><INDENT>while not a_empty:<EOL><INDENT>a = next(a_it, None)<EOL>if a is None:<EOL><INDENT>a_empty = True<EOL>break<EOL><DEDENT>elif a.rank == <NUM_LIT:0>:<EOL><INDENT>tmp.append(a)<EOL>a = None<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>while not b_empty:<EOL><INDENT>b = next(b_it, None)<EOL>if b is None:<EOL><INDENT>b_empty = True<EOL>break<EOL><DEDENT>elif b.rank == <NUM_LIT:0>:<EOL><INDENT>tmp.append(b)<EOL>b = None<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>if a is not None or b is not None:<EOL><INDENT>a._merge_with_other_stm(b)<EOL>tmp.append(a)<EOL>a = None<EOL>b = None<EOL><DEDENT><DEDENT>return tmp<EOL>
Merge two lists of statements into one

:return: list of merged statements