code: def _assert_is_identical_nodeflow(nf1, nf2):
      assert nf1.num_nodes() == nf2.num_nodes()
      src, dst = nf1.all_edges()
      src2, dst2 = nf2.all_edges()
      assert F.array_equal(src, src2)
      assert F.array_equal(dst, dst2)
  
      assert nf1.num_layers == nf2.num_layers
      for i in range(nf1.num_layers):
          assert nf1.layer_size(i) == nf2.layer_size(i)
          assert nf1.layers[i].data.keys() == nf2.layers[i].data.keys()
          for k in nf1.layers[i].data:
              assert F.allclose(
                  nf1.layers[i].data[k], nf2.layers[i].data[k]
              )
      assert nf1.num_blocks == nf2.num_blocks
      for i in range(nf1.num_blocks):
          assert nf1.block_size(i) == nf2.block_size(i)
          assert nf1.blocks[i].data.keys() == nf2.blocks[i].data.keys()
          for k in nf1.blocks[i].data:
              assert F.allclose(
                  nf1.blocks[i].data[k], nf2.blocks[i].data[k]
              )
  
imports: import io
  import pickle
  import unittest
  import backend
  import dgl
  import dgl.function
  import networkx
  import pytest
  import scipy.sparse
  from dgl.graph_index import create_graph_index
  from dgl.utils import toindex
  from utils import assert_is_identical, assert_is_identical_hetero, check_graph_equal, get_cases, parametrize_idtype
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_is_identical_nodeflow(nf1, nf2) without return types