def METHOD_NAME(ref, bodies=SYSTEM, px=0.0, py=0.0, pz=0.0):
    for (r, [vx, vy, vz], m) in bodies:
        px -= vx * m[0]
        py -= vy * m[0]
        pz -= vz * m[0]
    (r, v, m) = ref
    v[0] = px / m[0]
    v[1] = py / m[0]
    v[2] = pz / m[0]