human
I wrote the below code

    def update_timer():
        if ((time.time() - os.stat(TRAILS_FILE).st_mtime) >= config.UPDATE_PERIOD):
            _ = None
            while True:
                _ = load_trails(True)
                if _:
                    trails.clear()
                    trails.update(_)
                    break
                else:
                    time.sleep(LOAD_TRAILS_RETRY_SLEEP_TIME)
        threading.Timer(config.UPDATE_PERIOD, update_timer).start()
    update_timer()
    count = 0L
    while True:
        try:
            if ((count % mod) == offset):
                if (count >= n.value):
                    time.sleep(REGULAR_SENSOR_SLEEP_TIME)
                    continue
                content = read_block(buffer, count)
                if (content is None):
                    break
                if (len(content) < 12):
                    continue
                (sec, usec, ip_offset) = struct.unpack('=III', content[:12])
                packet = content[12:]
                process_packet(packet, sec, usec, ip_offset)
            count += 1
        except KeyboardInterrupt:
            break

What's a good function header?
assistant
#Here's a good function header.

def worker(buffer, n, offset, mod, process_packet):