code: def split_input_output(self, text):
          
          lines = _to_lines(text)
          i = 0
          for line in lines:
              if _starts_with_regex(line, self.input_prompt_regex):
                  i += 1
              else:
                  break
          return lines[:i], lines[i:]
docs: Split code into input lines and output lines, according to the
          input and output prompt templates.