def pat_matrix(m, dx, dy, dz):
    dxdy = -dx*dy
    dydz = -dy*dz
    dzdx = -dz*dx
    dxdx = dx**2
    dydy = dy**2
    dzdz = dz**2
    mat = ((dydy + dzdz, dxdy, dzdx),
           (dxdy, dxdx + dzdz, dydz),
           (dzdx, dydz, dydy + dxdx))
    return m*Matrix(mat)
Returns the Parallel Axis Theorem matrix to translate the inertia
dataset/ETHPy150Open sympy/sympy/sympy/physics/matrices.py/pat_matrix