code: def test_thread_block_group(self):
      @jit.rawkernel()
      def test_thread_block(x):
          g = jit.cg.this_thread_block()
          if g.thread_rank() == 0:
              x[0] += 101
          if g.thread_rank() == 1:
              x[1] = g.size()
          # test dim3
          if g.thread_rank() == 2:
              g_idx = g.group_index()
              x[2], x[3], x[4] = g_idx.x, g_idx.y, g_idx.z
          if g.thread_rank() == 3:
              t_idx = g.thread_index()
              x[5], x[6], x[7] = t_idx.x, t_idx.y, t_idx.z
          if g.thread_rank() == 4:
              g_dim = g.group_dim()
              x[8], x[9], x[10] = g_dim.x, g_dim.y, g_dim.z
          g.sync()
  
      x = cupy.empty((16,), dtype=cupy.int64)
      x[:] = -1
      test_thread_block[1, 32](x)
      assert x[0] == 100
      assert x[1] == 32
      assert (x[2], x[3], x[4]) == (0, 0, 0)
      assert (x[5], x[6], x[7]) == (3, 0, 0)
      assert (x[8], x[9], x[10]) == (32, 1, 1)
      assert (x[11:] == -1).all()
  
file_path: cupy/tests/cupyx_tests/jit_tests/test_cooperative_groups.py
imports: import pytest
  import cupy
  from cupy.cuda import runtime
  from cupyx import jit
label_desc: Use image node_id 1 for calling the TestCooperativeGroups obj's underlying member method code with example usage: obj.test_thread_block_group() without return types