code: def test_correlation_nans():
      row1 = 5
      col = 10
      row2 = 6
      mat1 = prng.rand(row1, col).astype(np.float32)
      mat2 = prng.rand(row2, col).astype(np.float32)
      mat1[0, 0] = np.nan
      corr = compute_correlation(mat1, mat2, return_nans=False)
      assert np.all(corr == 0, axis=1)[0]
      assert np.sum(corr == 0) == row2
      corr = compute_correlation(mat1, mat2, return_nans=True)
      assert np.all(np.isnan(corr), axis=1)[0]
      assert np.sum(np.isnan(corr)) == row2
  
imports: import numpy
  from numpy.random import RandomState
  from brainiak.fcma.util import compute_correlation
label_desc: Use image node_id 2 for calling a global function with example usage: test_correlation_nans() without return types