The Children's Hospital of Philadelphia needs to identify the busiest simultaneous appointment period from a schedule of patient visits. Given appointment intervals, return the maximum number of appointments active at the same time.
Each appointment is represented as [start, end], where start and end are integer time values. Treat intervals as half-open: an appointment is active at start and inactive at end. Therefore, an appointment ending at time t does not overlap one starting at time t.
Implement max_overlapping_appointments(appointments), where appointments is a list of integer pairs. Return an integer representing the maximum number of simultaneous active appointments. Return 0 for an empty list.
def max_overlapping_appointments(appointments):