I understand why stress-energy tensor for a comoving observer at rest relative to the fluid is
diag$\{\rho, -P,-P,-P\}$
How does this lead to the generalized covariant form, often quoted in textbooks as
$$T^\mu{}_\nu=(\rho+P)U^\mu U_\nu-P\delta^\mu{}_\nu$$ ?
Thanks.