merge_contacts(contacts) where each is {'email', 'name', 'phone'} (phone may be None): keep the FIRST occurrence's name, fill a missing phone from any later duplicate, and return the merged list in first-seen order.merge_contacts([{'email': 'A@x.com', 'name': 'Asha', 'phone': None}, {'email': 'a@x.com', 'name': 'A. Rao', 'phone': '981'}])[{'email': 'a@x.com', 'name': 'Asha', 'phone': '981'}]One identity: first name kept, phone backfilled.
A dict keyed by lowered email, plus an order list.
Only overwrite phone when the stored one is None.