code: def test_square_basis_grid():
      nchan = 8
      bds = [-1, 1]
      s = InvertedEncoding2D(
          stim_xlim=bds, stim_ylim=bds, stimulus_resolution=10
      )
      _, centers = s.define_basis_functions_sqgrid(nchannels=nchan)
      assert centers.shape[0] == nchan * nchan
      xspacing = np.round(np.diff(centers[:, 0]), 5)
      yspacing = np.round(np.diff(centers[:, 1]), 5)
      assert xspacing[0] == xspacing[28] == xspacing[-1]
      assert yspacing[0] == yspacing[25] == yspacing[-1]
  
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 12 for calling a global function with example usage: test_square_basis_grid() without return types