class_docstr: Unit tests for the chain decomposition function.
docstr: Test chain decomposition when root is not in graph
code: def test_chain_decomposition_root_not_in_G(self):
      """Test chain decomposition when root is not in graph"""
      G = nx.Graph()
      G.add_nodes_from([1, 2, 3])
      with pytest.raises(nx.NodeNotFound):
          nx.has_bridges(G, root=6)
  
file_path: networkx/networkx/algorithms/tests/test_chains.py
imports: from itertools import cycle, islice
  import pytest
  import networkx
label_desc: Use image node_id 6 for calling the TestChainDecomposition obj's underlying member method code with example usage: obj.test_chain_decomposition_root_not_in_G() without return types