Attached please find the coherency script by Guido Nolte who kindly agreed to include it into TVB. We use it for Imaginary Coherence analysis. Details for usage can be found in the help section. It can be used for any multivariate data set. The output is 1) the cross-spectrum and 2) the complex coherency, from which the imaginary part can easily be extracted in MATLAB with the imag(complex_value) function.
Since a Coherence analysis tool already exists in the TVB beta version which should output complex coherency, the latter statement's equivalent in Python (complex_value.imag) would probably be all that is needed for adding ImCoh analysis to TVB.