code: def test_graph_serialize_with_feature():
      num_graphs = 100
  
      t0 = time.time()
  
      g_list = construct_graph(num_graphs)
  
      t1 = time.time()
  
      # create a temporary file and immediately release it so DGL can open it.
      f = tempfile.NamedTemporaryFile(delete=False)
      path = f.name
      f.close()
  
      dgl.save_graphs(path, g_list)
  
      t2 = time.time()
      idx_list = np.random.permutation(np.arange(num_graphs)).tolist()
      loadg_list, _ = dgl.load_graphs(path, idx_list)
  
      t3 = time.time()
      idx = idx_list[0]
      load_g = loadg_list[0]
      print("Save time: {} s".format(t2 - t1))
      print("Load time: {} s".format(t3 - t2))
      print("Graph Construction time: {} s".format(t1 - t0))
  
      assert F.allclose(load_g.nodes(), g_list[idx].nodes())
  
      load_edges = load_g.all_edges("uv", "eid")
      g_edges = g_list[idx].all_edges("uv", "eid")
      assert F.allclose(load_edges[0], g_edges[0])
      assert F.allclose(load_edges[1], g_edges[1])
      assert F.allclose(load_g.edata["e1"], g_list[idx].edata["e1"])
      assert F.allclose(load_g.edata["e2"], g_list[idx].edata["e2"])
      assert F.allclose(load_g.ndata["n1"], g_list[idx].ndata["n1"])
  
      os.unlink(path)
  
imports: import os
  import tempfile
  import time
  import unittest
  import warnings
  import backend
  import dgl
  import dgl.ndarray
  import numpy
  import pytest
  import scipy
  from dgl.data.utils import load_labels, load_tensors, save_tensors
label_desc: Use image node_id 3 for calling a global function with example usage: test_graph_serialize_with_feature() without return types