def _replace_booleans(tok):
toknum, tokval = tok<EOL>if toknum == tokenize.OP:<EOL><INDENT>if tokval == '<STR_LIT:&>':<EOL><INDENT>return tokenize.NAME, '<STR_LIT>'<EOL><DEDENT>elif tokval == '<STR_LIT:|>':<EOL><INDENT>return tokenize.NAME, '<STR_LIT>'<EOL><DEDENT>return toknum, tokval<EOL><DEDENT>return toknum, tokval<EOL>
Replace ``&`` with ``and`` and ``|`` with ``or`` so that bitwise
    precedence is changed to boolean precedence.

    Parameters
    ----------
    tok : tuple of int, str
        ints correspond to the all caps constants in the tokenize module

    Returns
    -------
    t : tuple of int, str
        Either the input or token or the replacement values