import six


def _convert_expression_operator(expr):
    """ Convert expression operators from '=' style to 'eq' style
    Args:
        expr (str): Expression to convert
    Returns:
        str: Converted expression
    """
    TO_CONVERT = {
        ' eq ': ['=', '=='],
        ' ne ': ['!=', '=!'],
        ' lt ': ['<'],
        ' le ': ['<=', '=<'],
        ' gt ': ['>'],
        ' ge ': ['>=', '=>']
    }
    for op, matches in six.iteritems(TO_CONVERT):
        for match in matches:
            if match in expr:
                return expr.replace(match, op)
    return expr