code: def test_2d_cos_size_fcns():
      bds = [-1, 1]
      s = np.random.rand()
      imodel = InvertedEncoding2D(
          stim_xlim=bds, stim_ylim=bds, stimulus_resolution=10
      )
      fwhm = imodel._2d_cosine_sz_to_fwhm(s)
      s2 = imodel._2d_cosine_fwhm_to_sz(fwhm)
      assert np.isclose(s, s2)
      fwhm2 = imodel._2d_cosine_sz_to_fwhm(s2)
      assert np.isclose(fwhm, fwhm2)
  
imports: import pytest
  import numpy
  import logging
  from brainiak.reconstruct.iem import InvertedEncoding1D, InvertedEncoding2D
  from brainiak.utils.fmrisim import generate_1d_gaussian_rfs, generate_1d_rf_responses
  from scipy.stats import circmean
label_desc: Use image node_id 11 for calling a global function with example usage: test_2d_cos_size_fcns() without return types