code: def test_disconnected_graph():
      # https://github.com/networkx/networkx/issues/1144
      G = nx.Graph()
      G.add_edges_from([(0, 1), (1, 2), (2, 0), (3, 4)])
      assert not nx.is_tree(G)
  
      G = nx.DiGraph()
      G.add_edges_from([(0, 1), (1, 2), (2, 0), (3, 4)])
      assert not nx.is_tree(G)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_disconnected_graph() without return types