@classmethod
def _partition_lines(cls, line, cell):
    """
        Check the code for additional use of %%opts. Enables
        multi-line use of %%opts in a single call to the magic.
        """
    if cell is None:
        return line, cell
    specs, code = [line], []
    for line in cell.splitlines():
        if line.strip().startswith('%%opts'):
            specs.append(line.strip()[7:])
        else:
            code.append(line)
    return ' '.join(specs), '\n'.join(code)
