code: def test_pin_unpin_column():
      g = dgl.graph(([1, 2, 3, 4], [0, 0, 0, 0]))
  
      g.ndata["x"] = torch.randn(g.num_nodes())
      g.pin_memory_()
      assert g.is_pinned()
      assert g.ndata["x"].is_pinned()
      for col in g._node_frames[0].values():
          assert col.pinned_by_dgl
          assert col._data_nd is not None
  
      g.ndata["x"] = torch.randn(
          g.num_nodes()
      )  # unpin the old ndata['x']
      assert g.is_pinned()
      for col in g._node_frames[0].values():
          assert not col.pinned_by_dgl
          assert col._data_nd is None
      assert not g.ndata["x"].is_pinned()
  
file_path: dgl/tests/python/pytorch/utils/test_pin_memory.py
imports: import backend
  import dgl
  import pytest
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: test_pin_unpin_column() without return types