code: def bridge_components(G):
      """Finds all bridge-connected components G.
  
      Parameters
      ----------
      G : NetworkX undirected graph
  
      Returns
      -------
      bridge_components : a generator of 2-edge-connected components
  
  
      See Also
      --------
      :func:`k_edge_subgraphs` : this function is a special case for an
          undirected graph where k=2.
      :func:`biconnected_components` : similar to this function, but is defined
          using 2-node-connectivity instead of 2-edge-connectivity.
  
      Raises
      ------
      NetworkXNotImplemented
          If the input graph is directed or a multigraph.
  
      Notes
      -----
      Bridge-connected components are also known as 2-edge-connected components.
  
      Examples
      --------
      >>> # The barbell graph with parameter zero has a single bridge
      >>> G = nx.barbell_graph(5, 0)
      >>> from networkx.algorithms.connectivity.edge_kcomponents import bridge_components
      >>> sorted(map(sorted, bridge_components(G)))
      [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
      """
      H = G.copy()
      H.remove_edges_from(nx.bridges(G))
      yield from nx.connected_components(H)
  
file_path: networkx/networkx/algorithms/connectivity/edge_kcomponents.py
imports: import itertools
  from functools import partial
  import networkx
  from networkx.utils import arbitrary_element, not_implemented_for
label_desc: Use image node_id 4 for calling a global function with example usage: bridge_components(G) without return types