Implement a search algorithm for retrieving patient records efficiently in a healthcare system like RapidAI. Assume records is sorted in ascending order by unique patient_id. Implement search_patient(records, patient_id) to return the matching record, or None when no record exists. Each record is a dictionary containing at least the key patient_id.
records is sorted in ascending order by patient_id.patient_id.records may be empty.def search_patient(records, patient_id):