code: def test_onion_self_loop(self):
      G = nx.cycle_graph(3)
      G.add_edge(0, 0)
      with pytest.raises(
          nx.NetworkXNotImplemented,
          match="Input graph contains self loops",
      ):
          nx.onion_layers(G)
  
imports: import pytest
  import networkx
  from networkx.utils import nodes_equal
label_desc: Use image node_id 26 for calling the TestCore obj's underlying member method code with example usage: obj.test_onion_self_loop() without return types