def insert(self, lines=None):
for i, (key, line) in enumerate(lines.items()):<EOL><INDENT>n = key + i<EOL>first_half = self._lines[:n]<EOL>last_half = self._lines[n:]<EOL>self._lines = first_half + [line] + last_half<EOL><DEDENT>
Insert lines into the editor.

Note:
    To insert before the first line, use :func:`~exa.core.editor.Editor.preappend`
    (or key 0); to insert after the last line use :func:`~exa.core.editor.Editor.append`.

Args:
    lines (dict): Dictionary of lines of form (lineno, string) pairs