def METHOD_NAME(jid, njobs):
    bgs = {}
    for pid, p in enumerate(data):
        if pid % njobs != jid:
            continue
        bg = median_filter(p, filt_shape)
        if jid==0:
            print("processing panel %d / %d" % (pid, len(data)) )
        bgs[pid] = bg
    return bgs