code: def test_nodes(self):
      assert nodes_equal(self.G.nodes(), list(nx.nodes(self.G)))
      assert nodes_equal(self.DG.nodes(), list(nx.nodes(self.DG)))
  
imports: import random
  import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 2 for calling the TestFunction obj's underlying member method code with example usage: obj.test_nodes() without return types