def METHOD_NAME(parsed_case_expr):
    def _join_or(groupby_item):
        items = list(groupby_item[1])
        exprs = [x["sql_expr"] for x in items]
        if len(exprs) > 1:
            exprs = [f"({e})" for e in exprs]
        merged = "\n OR ".join(exprs)
        if len(items) > 0:
            value = items[0]["value"]
        else:
            value = None
        return {"sql_condition": merged, "value": value}
    gb = groupby(parsed_case_expr, key=lambda x: x["label"])
    grouped_parsed = list(map(_join_or, gb))
    # Guarantee order and that -1 (null) comes first
    grouped_parsed = sorted(
        grouped_parsed, key=lambda x: -x["value"] if x["value"] >= 0 else -9999
    )
    return grouped_parsed