code: def test_dfs_tree_isolates(self):
      G = nx.Graph()
      G.add_node(1)
      G.add_node(2)
      T = nx.dfs_tree(G, source=1)
      assert sorted(T.nodes()) == [1]
      assert sorted(T.edges()) == []
      T = nx.dfs_tree(G, source=None)
      assert sorted(T.nodes()) == [1, 2]
      assert sorted(T.edges()) == []
  
imports: import networkx
label_desc: Use image node_id 10 for calling the TestDFS obj's underlying member method code with example usage: obj.test_dfs_tree_isolates() without return types