code: def test_sparse(self):
      grid_full = mgrid[-1:1:10j, -2:2:10j]
      grid_sparse = ogrid[-1:1:10j, -2:2:10j]
  
      # sparse grids can be made dense by broadcasting
      grid_broadcast = np.broadcast_arrays(*grid_sparse)
      for f, b in zip(grid_full, grid_broadcast):
          assert_equal(f, b)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_raises, assert_raises_regex
  from numpy.lib.index_tricks import mgrid, ogrid, ndenumerate, fill_diagonal, diag_indices, diag_indices_from, index_exp, ndindex, r_, s_, ix_
label_desc: Use image node_id 4 for calling the TestGrid obj's underlying member method code with example usage: obj.test_sparse() without return types