@classmethod
    def split_code(cls, code, PS1, PS2):
        processed_lines = []
        for line in textwrap.dedent(code).split('\n'):
            if not line or line.startswith(PS1) or line.startswith(PS2):
                processed_lines.append(line)
                continue

            assert len(processed_lines) > 0, 'code improperly formated: {}'.format(code)
            if not isinstance(processed_lines[-1], CodeAnswer):
                processed_lines.append(CodeAnswer())
            processed_lines[-1].update(line)
        return processed_lines
Splits the given string of code based on the provided PS1 and PS2
dataset/ETHPy150Open Cal-CS-61A-Staff/ok-client/client/sources/common/interpreter.py/CodeCase.split_code