def _replace_booleans(source):
    """Replace ``&`` with ``and`` and ``|`` with ``or`` so that bitwise
    precedence is changed to boolean precedence.
    """
    return source.replace('|', ' or ').replace('&', ' and ')