Given these two JSON files with mismatched data formats, how would you programmatically identify and merge the records?
Implement merge_json_records(left_records, right_records). Each input is an array of objects. Recognize id, user_id, or userId as the identifier; email, email_address, or nested contact.email as the email; and name, full_name, or fullName as the name. Normalize email case and surrounding whitespace. Match by normalized email first, then identifier. Merge matched records into canonical id, name, and email fields, preserve non-null fields from both records, and let the right input override conflicting values. Return records in left-input order, followed by unmatched right records.
Example: [{"user_id":7,"full_name":"Ava","email_address":" AVA@x.com "}] and [{"id":7,"name":"Ava Chen","contact":{"email":"ava@x.com"}}] produce one merged record.
def merge_json_records(left_records, right_records):