Determine the maximum capacity required to handle all events.
Implement max_capacity(events), where each event is represented as [start, end) and start < end. Return the largest number of events active at the same time. Events ending at time t do not overlap events starting at time t.
Input is a list of integer interval pairs, and output is an integer.
def max_capacity(events):