code: def test_gpu_cache(idtype):
      g = generate_graph(idtype)
      cache = dgl.cuda.GPUCache(5, D, idtype)
      h = g.ndata["h"]
  
      t = 5
      keys = F.arange(0, t, dtype=idtype)
      values, m_idx, m_keys = cache.query(keys)
      m_values = h[F.tensor(m_keys, F.int64)]
      values[F.tensor(m_idx, F.int64)] = m_values
      cache.replace(m_keys, m_values)
  
      keys = F.arange(3, 8, dtype=idtype)
      values, m_idx, m_keys = cache.query(keys)
      assert m_keys.shape[0] == 3 and m_idx.shape[0] == 3
      m_values = h[F.tensor(m_keys, F.int64)]
      values[F.tensor(m_idx, F.int64)] = m_values
      assert (values != h[F.tensor(keys, F.int64)]).sum().item() == 0
      cache.replace(m_keys, m_values)
  
imports: import unittest
  import backend
  import dgl
  from utils import parametrize_idtype
label_desc: Use image node_id 2 for calling a global function with example usage: test_gpu_cache(idtype) without return types