There are two points here:
1. Data centering, which is actually what the lines you reported deal with;
2. Bias, which is the normalisation by n or n-1. `empirical_covariance` provide a board verosion of the covariance (divided by n) so if you are looking for the non-biased empirical covariance you would need to apply a n/(n-1) scaling.