(G)
| 154 | |
| 155 | @patch_docstring(func.number_of_selfloops) |
| 156 | def number_of_selfloops(G): |
| 157 | if G.is_multigraph(): |
| 158 | # we forward the MultiGraph nd MultiDiGraph |
| 159 | return sum(1 for _ in selfloop_edges(G)) |
| 160 | return G.number_of_selfloops() |
| 161 | |
| 162 | |
| 163 | @patch_docstring(func.set_node_attributes) |
nothing calls this directly
no test coverage detected