human
Complete this python program:
def _mdiff(fromlines, tolines, context=None, linejunk=None, charjunk=IS_CHARACTER_JUNK):
assistant
#Here is the Python program you requested.

    """Returns generator yielding marked up from/to side by side differences.
    Arguments:
    fromlines -- list of text lines to compared to tolines
    tolines -- list of text lines to be compared to fromlines
    context -- number of context lines to display on each side of difference,
    if None, all from/to text lines will be generated.
    linejunk -- passed on to ndiff (see ndiff documentation)
    charjunk -- passed on to ndiff (see ndiff documentation)
    This function returns an iterator which returns a tuple:
    (from line tuple, to line tuple, boolean flag)
    from/to line tuple -- (line num, line text)
    line num -- integer or None (to indicate a context separation)
    line text -- original line text with following markers inserted:
    \\0+\ -- marks start of added text
    \\0-\ -- marks start of deleted text
    \\0^\ -- marks start of changed text
    \\1\ -- marks end of added/deleted/changed text
    boolean flag -- None indicates context separation, True indicates
    either "from" or "to" line contains a change, otherwise False.
    This function/iterator was originally developed to generate side by side
    file difference for making HTML pages (see HtmlDiff class for example
    usage).
    Note, this function utilizes the ndiff function to generate the side by
    side difference markup.  Optional ndiff arguments may be passed to this
    function and they in turn will be passed to ndiff.
    """
    import re
    change_re = re.compile('(\\++|\\-+|\\^+)')
    diff_lines_iterator = ndiff(fromlines, tolines, linejunk, charjunk)
    def _make_line(lines, format_key, side, num_lines=[0, 0]):
        'Returns    line    of    text    with    user\'s    change    markup    and    line    formatting.\n\n                                lines    --    list    of    lines    from    the    ndiff    generator    to    produce    a    line    of\n                                                                    text    from.        When    producing    the    line    of    text    to    return,    the\n                                                                    lines    used    are    removed    from    this    list.\n                                format_key    --    \'+\'    return    first    line    in    list    with    "add"    markup    around\n                                                                                                        the    entire    line.\n                                                                                        \'-\'    return    first    line    in    list    with    "delete"    markup    around\n                                                                                                        the    entire    line.\n                                                                                        \'?\'    return    first    line    in    list    with    add/delete/change\n                                                                                                        intraline    markup    (indices    obtained    from    second    line)\n                                                                                        None    return    first    line    in    list    with    no    markup\n                                side    --    indice    into    the    num_lines    list    (0=from,1=to)\n                                num_lines    --    from/to    current    line    number.        This    is    NOT    intended    to  ...