def METHOD_NAME():
    global latency_packet_sent
    if 'serial' in options:
        for x in msg[latency_packet_sent]:
            ser_rc.write(struct.pack('<B', x))
        if not 'ivy' in options:
            del msg[0]
    if 'ivy' in options and latency_packet_sent-latency_packet_behind >=0:
        print "IVY:    {}".format(msg[0][1:])
        i_interface.send_ivy_msg('ground_dl', 'SBUS', msg[0][1:])
        del msg[0]
    if latency_packet_behind-latency_packet_sent <=0:
        latency_packet_sent = latency_packet_behind - 1
    latency_packet_sent += 1