def METHOD_NAME(packets, plot):
    packets_look_up = {}
    first_sequence_number = packets[0].sequence_number
    last_sequence_number = packets[-1].sequence_number
    for packet in packets:
        packets_look_up[packet.sequence_number] = packet
    y = []
    x = []
    first_arrival_time = 0
    last_arrival_time = 0
    last_arrival_time_diff = 0
    for sequence_number in range(first_sequence_number,
                                 last_sequence_number + 1):
        if sequence_number in packets_look_up:
            y.append(0)
            if first_arrival_time == 0:
                first_arrival_time = packets_look_up[
                    sequence_number].arrival_timestamp
            x_time = (packets_look_up[sequence_number].arrival_timestamp -
                      first_arrival_time)
            if last_arrival_time != 0:
                last_arrival_time_diff = x_time - last_arrival_time
            last_arrival_time = x_time
            x.append(x_time / 1000000.0)
        else:
            if last_arrival_time != 0 and last_arrival_time_diff != 0:
                x.append(
                    (last_arrival_time + last_arrival_time_diff) / 1000000.0)
                y.append(1)
    plot.grid(True)
    plot.set_title("Lost packets [0/1]")
    plot.plot(x, y)