code: def test_citation_graph():
      transform = dgl.AddSelfLoop(allow_duplicate=True)
  
      # cora
      g = data.CoraGraphDataset(force_reload=True, reorder=True)[0]
      assert g.num_nodes() == 2708
      assert g.num_edges() == 10556
      dst = F.asnumpy(g.edges()[1])
      assert np.array_equal(dst, np.sort(dst))
      g2 = data.CoraGraphDataset(transform=transform)[0]
      assert g2.num_edges() - g.num_edges() == g.num_nodes()
  
      # Citeseer
      g = data.CiteseerGraphDataset(force_reload=True, reorder=True)[0]
      assert g.num_nodes() == 3327
      assert g.num_edges() == 9228
      dst = F.asnumpy(g.edges()[1])
      assert np.array_equal(dst, np.sort(dst))
      g2 = data.CiteseerGraphDataset(transform=transform)[0]
      assert g2.num_edges() - g.num_edges() == g.num_nodes()
  
      # Pubmed
      g = data.PubmedGraphDataset(force_reload=True, reorder=True)[0]
      assert g.num_nodes() == 19717
      assert g.num_edges() == 88651
      dst = F.asnumpy(g.edges()[1])
      assert np.array_equal(dst, np.sort(dst))
      g2 = data.PubmedGraphDataset(transform=transform)[0]
      assert g2.num_edges() - g.num_edges() == g.num_nodes()
  
imports: import gzip
  import io
  import os
  import tarfile
  import tempfile
  import unittest
  import warnings
  import backend
  import dgl
  import dgl.data
  import numpy
  import pandas
  import pytest
  import yaml
  from dgl import DGLError
label_desc: Use image node_id 6 for calling a global function with example usage: test_citation_graph() without return types