Basic overwrite
Input
merge_dicts({'a':1,'b':2}, {'b':3,'c':4})
Output
{'a': 1, 'b': 3, 'c': 4}
The key 'b' exists in both; the value from the second dictionary (3) overwrites the first (2). The merged dictionary preserves insertion order: keys from d1 first (in their order), then new keys from d2.