<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(constraints):
 """ Constraints must be expressed as a string containing only spaces and key value pairs joined by an '='. """

    if not constraints:
        return None

    if type(constraints) is dict:
        # Fowards compatibilty: already parsed
        return constraints

    constraints = {
        normalize_key(k): (
            normalize_list_value(v) if k in LIST_KEYS else
            normalize_value(v)
        ) for k, v in [s.split("=") for s in constraints.split(" ")]}

    return constraints