<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def union(dict1, dict2):
 """ Deep merge of dict2 into dict1. May be dictionaries or dictobj's. Values in dict2 will replace values in dict1 where they vary but have the same key. When lists are encountered, the dict2 list will replace the dict1 list. This will alter the first dictionary. The returned result is dict1, but it will have references to both dictionaries. If you do not want this, use union_copy(), which is less efficient but data-safe. '{"a": {"b": {"c": 1, "d": 2}}, "e": [1, 2]}' '{"a": {"b": {"c": 1, "d": 2}}, "e": [1, 2]}' '{"a": {"b": {"d": 2}}, "e": [1, 2]}' '{"a": {"b": {"c": 1, "d": 2}}, "e": [3, 2]}' '{"a": {"b": {"d": 2}}, "e": [3, 2]}' """

    for key, value in dict2.items():
        if key in dict1 and isinstance(value, dict):
            dict1[key] = union(dict1[key], value)
        else:
            dict1[key] = value
    return dict1