code: def assert_is_identical(g, g2):
      assert g.num_nodes() == g2.num_nodes()
      src, dst = g.all_edges(order="eid")
      src2, dst2 = g2.all_edges(order="eid")
      assert F.array_equal(src, src2)
      assert F.array_equal(dst, dst2)
  
      assert len(g.ndata) == len(g2.ndata)
      assert len(g.edata) == len(g2.edata)
      for k in g.ndata:
          assert F.allclose(g.ndata[k], g2.ndata[k])
      for k in g.edata:
          assert F.allclose(g.edata[k], g2.edata[k])
  
file_path: dgl/tests/utils/checks.py
imports: import backend
  import dgl
  import pytest
  from dgl.base import is_internal_column
label_desc: Use image node_id 2 for calling a global function with example usage: assert_is_identical(g, g2) without return types