def parse_operator(mathstr):
try:<EOL><INDENT>return OPERATORS[mathstr]<EOL><DEDENT>except KeyError as exc:<EOL><INDENT>exc.args = ('<STR_LIT>' % mathstr,)<EOL>raise<EOL><DEDENT>
Parse a `str` as a function from the `operator` module

    Parameters
    ----------
    mathstr : `str`
        a `str` representing a mathematical operator

    Returns
    -------
    op : `func`
        a callable `operator` module function

    Raises
    ------
    KeyError
        if input `str` cannot be mapped to an `operator` function

    Examples
    --------
    >>> parse_operator('>')
    <built-in function gt>