def METHOD_NAME(eq_string, vars, substract_lhs=True, to_sympy=False):
    eq = eq_string.split("|")[0]  # ignore complentarity constraints
    if "==" not in eq:
        eq = eq.replace("=", "==")
    expr = ast.parse(eq).body[0].value
    expr_std = stringify(expr, variables=vars)
    if isinstance(expr_std, Compare):
        lhs = expr_std.left
        rhs = expr_std.comparators[0]
        if substract_lhs:
            expr_std = BinOp(left=rhs, right=lhs, op=Sub())
        else:
            if to_sympy:
                return [ast_to_sympy(lhs), ast_to_sympy(rhs)]
            return [lhs, rhs]
    if to_sympy:
        return ast_to_sympy(expr_std)
    else:
        return expr_std