FDR or Bonferroni correction

I used nilearn package to compute correlation matrix of the resting state fMRI dataset.
By using the standard method (Ledoit Wolf shrinkage), I could get a correlation matrix for each subject.
However, I am still confused about dealing with FDR or Bonferroni correction.

How can I get a corrected correlation matrix in python?
Do I have to correct correlation matrices after doing GLM?

Do you want to threshold the correlation matrices or do you want to threshold the result of a GLM run on correlation matrices ?
In the first case, you probably don’t want to use LW (but also notice that the correlation values are not iid).
In the second case, you need a working statistical inference package. There are some functions doing that in nistats.thresholding
But I’m not sure I got your point.