def METHOD_NAME(
    times,
    addrs,
    deltat=1000,
    chunk_size=500,
    size=[2, 304, 240],
    ds_w=1,
    ds_h=1,
):
    t_start = times[0]
    ts = range(t_start, t_start + chunk_size * deltat, deltat)
    chunks = np.zeros([len(ts)] + size, dtype="int8")
    idx_start = 0
    idx_end = 0
    for i, t in enumerate(ts):
        idx_end += find_first(times[idx_end:], t)
        if idx_end > idx_start:
            ee = addrs[idx_start:idx_end]
            pol, x, y = (
                ee[:, 2],
                (ee[:, 0] // ds_w).astype(np.int),
                (ee[:, 1] // ds_h).astype(np.int),
            )
            np.add.at(chunks, (i, pol, x, y), 1)
        idx_start = idx_end
    return chunks