We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update plot_antigraph.py example to remove `_iter` in method name.
`def adjacency_iter(self)` should be `def adjacency(self)`
There may be other places (especially in the examples) where we've missed an ```_iter``` update.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/subclass/plot_antigraph.py`
Content:
```
1 """
2 =========
3 Antigraph
4 =========
5 
6 Complement graph class for small footprint when working on dense graphs.
7 
8 This class allows you to add the edges that *do not exist* in the dense
9 graph. However, when applying algorithms to this complement graph data
10 structure, it behaves as if it were the dense version. So it can be used
11 directly in several NetworkX algorithms.
12 
13 This subclass has only been tested for k-core, connected_components,
14 and biconnected_components algorithms but might also work for other
15 algorithms.
16 
17 """
18 import networkx as nx
19 from networkx.exception import NetworkXError
20 import matplotlib.pyplot as plt
21 
22 
23 class AntiGraph(nx.Graph):
24     """
25     Class for complement graphs.
26 
27     The main goal is to be able to work with big and dense graphs with
28     a low memory footprint.
29 
30     In this class you add the edges that *do not exist* in the dense graph,
31     the report methods of the class return the neighbors, the edges and
32     the degree as if it was the dense graph. Thus it's possible to use
33     an instance of this class with some of NetworkX functions.
34     """
35 
36     all_edge_dict = {"weight": 1}
37 
38     def single_edge_dict(self):
39         return self.all_edge_dict
40 
41     edge_attr_dict_factory = single_edge_dict
42 
43     def __getitem__(self, n):
44         """Return a dict of neighbors of node n in the dense graph.
45 
46         Parameters
47         ----------
48         n : node
49            A node in the graph.
50 
51         Returns
52         -------
53         adj_dict : dictionary
54            The adjacency dictionary for nodes connected to n.
55 
56         """
57         return {
58             node: self.all_edge_dict for node in set(self.adj) - set(self.adj[n]) - {n}
59         }
60 
61     def neighbors(self, n):
62         """Return an iterator over all neighbors of node n in the
63         dense graph.
64 
65         """
66         try:
67             return iter(set(self.adj) - set(self.adj[n]) - {n})
68         except KeyError as e:
69             raise NetworkXError(f"The node {n} is not in the graph.") from e
70 
71     def degree(self, nbunch=None, weight=None):
72         """Return an iterator for (node, degree) in the dense graph.
73 
74         The node degree is the number of edges adjacent to the node.
75 
76         Parameters
77         ----------
78         nbunch : iterable container, optional (default=all nodes)
79             A container of nodes.  The container will be iterated
80             through once.
81 
82         weight : string or None, optional (default=None)
83            The edge attribute that holds the numerical value used
84            as a weight.  If None, then each edge has weight 1.
85            The degree is the sum of the edge weights adjacent to the node.
86 
87         Returns
88         -------
89         nd_iter : iterator
90             The iterator returns two-tuples of (node, degree).
91 
92         See Also
93         --------
94         degree
95 
96         Examples
97         --------
98         >>> G = nx.path_graph(4)  # or DiGraph, MultiGraph, MultiDiGraph, etc
99         >>> list(G.degree(0))  # node 0 with degree 1
100         [(0, 1)]
101         >>> list(G.degree([0, 1]))
102         [(0, 1), (1, 2)]
103 
104         """
105         if nbunch is None:
106             nodes_nbrs = (
107                 (
108                     n,
109                     {
110                         v: self.all_edge_dict
111                         for v in set(self.adj) - set(self.adj[n]) - {n}
112                     },
113                 )
114                 for n in self.nodes()
115             )
116         elif nbunch in self:
117             nbrs = set(self.nodes()) - set(self.adj[nbunch]) - {nbunch}
118             return len(nbrs)
119         else:
120             nodes_nbrs = (
121                 (
122                     n,
123                     {
124                         v: self.all_edge_dict
125                         for v in set(self.nodes()) - set(self.adj[n]) - {n}
126                     },
127                 )
128                 for n in self.nbunch_iter(nbunch)
129             )
130 
131         if weight is None:
132             return ((n, len(nbrs)) for n, nbrs in nodes_nbrs)
133         else:
134             # AntiGraph is a ThinGraph so all edges have weight 1
135             return (
136                 (n, sum((nbrs[nbr].get(weight, 1)) for nbr in nbrs))
137                 for n, nbrs in nodes_nbrs
138             )
139 
140     def adjacency_iter(self):
141         """Return an iterator of (node, adjacency set) tuples for all nodes
142            in the dense graph.
143 
144         This is the fastest way to look at every edge.
145         For directed graphs, only outgoing adjacencies are included.
146 
147         Returns
148         -------
149         adj_iter : iterator
150            An iterator of (node, adjacency set) for all nodes in
151            the graph.
152 
153         """
154         for n in self.adj:
155             yield (n, set(self.adj) - set(self.adj[n]) - {n})
156 
157 
158 # Build several pairs of graphs, a regular graph
159 # and the AntiGraph of it's complement, which behaves
160 # as if it were the original graph.
161 Gnp = nx.gnp_random_graph(20, 0.8, seed=42)
162 Anp = AntiGraph(nx.complement(Gnp))
163 Gd = nx.davis_southern_women_graph()
164 Ad = AntiGraph(nx.complement(Gd))
165 Gk = nx.karate_club_graph()
166 Ak = AntiGraph(nx.complement(Gk))
167 pairs = [(Gnp, Anp), (Gd, Ad), (Gk, Ak)]
168 # test connected components
169 for G, A in pairs:
170     gc = [set(c) for c in nx.connected_components(G)]
171     ac = [set(c) for c in nx.connected_components(A)]
172     for comp in ac:
173         assert comp in gc
174 # test biconnected components
175 for G, A in pairs:
176     gc = [set(c) for c in nx.biconnected_components(G)]
177     ac = [set(c) for c in nx.biconnected_components(A)]
178     for comp in ac:
179         assert comp in gc
180 # test degree
181 for G, A in pairs:
182     node = list(G.nodes())[0]
183     nodes = list(G.nodes())[1:4]
184     assert G.degree(node) == A.degree(node)
185     assert sum(d for n, d in G.degree()) == sum(d for n, d in A.degree())
186     # AntiGraph is a ThinGraph, so all the weights are 1
187     assert sum(d for n, d in A.degree()) == sum(d for n, d in A.degree(weight="weight"))
188     assert sum(d for n, d in G.degree(nodes)) == sum(d for n, d in A.degree(nodes))
189 
190 pos = nx.spring_layout(G, seed=268)  # Seed for reproducible layout
191 nx.draw(Gnp, pos=pos)
192 plt.show()
193
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/subclass/plot_antigraph.py b/examples/subclass/plot_antigraph.py
--- a/examples/subclass/plot_antigraph.py
+++ b/examples/subclass/plot_antigraph.py
@@ -137,7 +137,7 @@
                 for n, nbrs in nodes_nbrs
             )
 
-    def adjacency_iter(self):
+    def adjacency(self):
         """Return an iterator of (node, adjacency set) tuples for all nodes
            in the dense graph.
 
@@ -149,10 +149,10 @@
         adj_iter : iterator
            An iterator of (node, adjacency set) for all nodes in
            the graph.
-
         """
-        for n in self.adj:
-            yield (n, set(self.adj) - set(self.adj[n]) - {n})
+        nodes = set(self.adj)
+        for n, nbrs in self.adj.items():
+            yield (n, nodes - set(nbrs) - {n})
 
 
 # Build several pairs of graphs, a regular graph

{"golden_diff": "diff --git a/examples/subclass/plot_antigraph.py b/examples/subclass/plot_antigraph.py\n--- a/examples/subclass/plot_antigraph.py\n+++ b/examples/subclass/plot_antigraph.py\n@@ -137,7 +137,7 @@\n                 for n, nbrs in nodes_nbrs\n             )\n \n-    def adjacency_iter(self):\n+    def adjacency(self):\n         \"\"\"Return an iterator of (node, adjacency set) tuples for all nodes\n            in the dense graph.\n \n@@ -149,10 +149,10 @@\n         adj_iter : iterator\n            An iterator of (node, adjacency set) for all nodes in\n            the graph.\n-\n         \"\"\"\n-        for n in self.adj:\n-            yield (n, set(self.adj) - set(self.adj[n]) - {n})\n+        nodes = set(self.adj)\n+        for n, nbrs in self.adj.items():\n+            yield (n, nodes - set(nbrs) - {n})\n \n \n # Build several pairs of graphs, a regular graph\n", "issue": "Update plot_antigraph.py example to remove `_iter` in method name.\n`def adjacency_iter(self)` should be `def adjacency(self)`\r\nThere may be other places (especially in the examples) where we've missed an ```_iter``` update.\n", "before_files": [{"content": "\"\"\"\n=========\nAntigraph\n=========\n\nComplement graph class for small footprint when working on dense graphs.\n\nThis class allows you to add the edges that *do not exist* in the dense\ngraph. However, when applying algorithms to this complement graph data\nstructure, it behaves as if it were the dense version. So it can be used\ndirectly in several NetworkX algorithms.\n\nThis subclass has only been tested for k-core, connected_components,\nand biconnected_components algorithms but might also work for other\nalgorithms.\n\n\"\"\"\nimport networkx as nx\nfrom networkx.exception import NetworkXError\nimport matplotlib.pyplot as plt\n\n\nclass AntiGraph(nx.Graph):\n    \"\"\"\n    Class for complement graphs.\n\n    The main goal is to be able to work with big and dense graphs with\n    a low memory footprint.\n\n    In this class you add the edges that *do not exist* in the dense graph,\n    the report methods of the class return the neighbors, the edges and\n    the degree as if it was the dense graph. Thus it's possible to use\n    an instance of this class with some of NetworkX functions.\n    \"\"\"\n\n    all_edge_dict = {\"weight\": 1}\n\n    def single_edge_dict(self):\n        return self.all_edge_dict\n\n    edge_attr_dict_factory = single_edge_dict\n\n    def __getitem__(self, n):\n        \"\"\"Return a dict of neighbors of node n in the dense graph.\n\n        Parameters\n        ----------\n        n : node\n           A node in the graph.\n\n        Returns\n        -------\n        adj_dict : dictionary\n           The adjacency dictionary for nodes connected to n.\n\n        \"\"\"\n        return {\n            node: self.all_edge_dict for node in set(self.adj) - set(self.adj[n]) - {n}\n        }\n\n    def neighbors(self, n):\n        \"\"\"Return an iterator over all neighbors of node n in the\n        dense graph.\n\n        \"\"\"\n        try:\n            return iter(set(self.adj) - set(self.adj[n]) - {n})\n        except KeyError as e:\n            raise NetworkXError(f\"The node {n} is not in the graph.\") from e\n\n    def degree(self, nbunch=None, weight=None):\n        \"\"\"Return an iterator for (node, degree) in the dense graph.\n\n        The node degree is the number of edges adjacent to the node.\n\n        Parameters\n        ----------\n        nbunch : iterable container, optional (default=all nodes)\n            A container of nodes.  The container will be iterated\n            through once.\n\n        weight : string or None, optional (default=None)\n           The edge attribute that holds the numerical value used\n           as a weight.  If None, then each edge has weight 1.\n           The degree is the sum of the edge weights adjacent to the node.\n\n        Returns\n        -------\n        nd_iter : iterator\n            The iterator returns two-tuples of (node, degree).\n\n        See Also\n        --------\n        degree\n\n        Examples\n        --------\n        >>> G = nx.path_graph(4)  # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> list(G.degree(0))  # node 0 with degree 1\n        [(0, 1)]\n        >>> list(G.degree([0, 1]))\n        [(0, 1), (1, 2)]\n\n        \"\"\"\n        if nbunch is None:\n            nodes_nbrs = (\n                (\n                    n,\n                    {\n                        v: self.all_edge_dict\n                        for v in set(self.adj) - set(self.adj[n]) - {n}\n                    },\n                )\n                for n in self.nodes()\n            )\n        elif nbunch in self:\n            nbrs = set(self.nodes()) - set(self.adj[nbunch]) - {nbunch}\n            return len(nbrs)\n        else:\n            nodes_nbrs = (\n                (\n                    n,\n                    {\n                        v: self.all_edge_dict\n                        for v in set(self.nodes()) - set(self.adj[n]) - {n}\n                    },\n                )\n                for n in self.nbunch_iter(nbunch)\n            )\n\n        if weight is None:\n            return ((n, len(nbrs)) for n, nbrs in nodes_nbrs)\n        else:\n            # AntiGraph is a ThinGraph so all edges have weight 1\n            return (\n                (n, sum((nbrs[nbr].get(weight, 1)) for nbr in nbrs))\n                for n, nbrs in nodes_nbrs\n            )\n\n    def adjacency_iter(self):\n        \"\"\"Return an iterator of (node, adjacency set) tuples for all nodes\n           in the dense graph.\n\n        This is the fastest way to look at every edge.\n        For directed graphs, only outgoing adjacencies are included.\n\n        Returns\n        -------\n        adj_iter : iterator\n           An iterator of (node, adjacency set) for all nodes in\n           the graph.\n\n        \"\"\"\n        for n in self.adj:\n            yield (n, set(self.adj) - set(self.adj[n]) - {n})\n\n\n# Build several pairs of graphs, a regular graph\n# and the AntiGraph of it's complement, which behaves\n# as if it were the original graph.\nGnp = nx.gnp_random_graph(20, 0.8, seed=42)\nAnp = AntiGraph(nx.complement(Gnp))\nGd = nx.davis_southern_women_graph()\nAd = AntiGraph(nx.complement(Gd))\nGk = nx.karate_club_graph()\nAk = AntiGraph(nx.complement(Gk))\npairs = [(Gnp, Anp), (Gd, Ad), (Gk, Ak)]\n# test connected components\nfor G, A in pairs:\n    gc = [set(c) for c in nx.connected_components(G)]\n    ac = [set(c) for c in nx.connected_components(A)]\n    for comp in ac:\n        assert comp in gc\n# test biconnected components\nfor G, A in pairs:\n    gc = [set(c) for c in nx.biconnected_components(G)]\n    ac = [set(c) for c in nx.biconnected_components(A)]\n    for comp in ac:\n        assert comp in gc\n# test degree\nfor G, A in pairs:\n    node = list(G.nodes())[0]\n    nodes = list(G.nodes())[1:4]\n    assert G.degree(node) == A.degree(node)\n    assert sum(d for n, d in G.degree()) == sum(d for n, d in A.degree())\n    # AntiGraph is a ThinGraph, so all the weights are 1\n    assert sum(d for n, d in A.degree()) == sum(d for n, d in A.degree(weight=\"weight\"))\n    assert sum(d for n, d in G.degree(nodes)) == sum(d for n, d in A.degree(nodes))\n\npos = nx.spring_layout(G, seed=268)  # Seed for reproducible layout\nnx.draw(Gnp, pos=pos)\nplt.show()\n", "path": "examples/subclass/plot_antigraph.py"}], "after_files": [{"content": "\"\"\"\n=========\nAntigraph\n=========\n\nComplement graph class for small footprint when working on dense graphs.\n\nThis class allows you to add the edges that *do not exist* in the dense\ngraph. However, when applying algorithms to this complement graph data\nstructure, it behaves as if it were the dense version. So it can be used\ndirectly in several NetworkX algorithms.\n\nThis subclass has only been tested for k-core, connected_components,\nand biconnected_components algorithms but might also work for other\nalgorithms.\n\n\"\"\"\nimport networkx as nx\nfrom networkx.exception import NetworkXError\nimport matplotlib.pyplot as plt\n\n\nclass AntiGraph(nx.Graph):\n    \"\"\"\n    Class for complement graphs.\n\n    The main goal is to be able to work with big and dense graphs with\n    a low memory footprint.\n\n    In this class you add the edges that *do not exist* in the dense graph,\n    the report methods of the class return the neighbors, the edges and\n    the degree as if it was the dense graph. Thus it's possible to use\n    an instance of this class with some of NetworkX functions.\n    \"\"\"\n\n    all_edge_dict = {\"weight\": 1}\n\n    def single_edge_dict(self):\n        return self.all_edge_dict\n\n    edge_attr_dict_factory = single_edge_dict\n\n    def __getitem__(self, n):\n        \"\"\"Return a dict of neighbors of node n in the dense graph.\n\n        Parameters\n        ----------\n        n : node\n           A node in the graph.\n\n        Returns\n        -------\n        adj_dict : dictionary\n           The adjacency dictionary for nodes connected to n.\n\n        \"\"\"\n        return {\n            node: self.all_edge_dict for node in set(self.adj) - set(self.adj[n]) - {n}\n        }\n\n    def neighbors(self, n):\n        \"\"\"Return an iterator over all neighbors of node n in the\n        dense graph.\n\n        \"\"\"\n        try:\n            return iter(set(self.adj) - set(self.adj[n]) - {n})\n        except KeyError as e:\n            raise NetworkXError(f\"The node {n} is not in the graph.\") from e\n\n    def degree(self, nbunch=None, weight=None):\n        \"\"\"Return an iterator for (node, degree) in the dense graph.\n\n        The node degree is the number of edges adjacent to the node.\n\n        Parameters\n        ----------\n        nbunch : iterable container, optional (default=all nodes)\n            A container of nodes.  The container will be iterated\n            through once.\n\n        weight : string or None, optional (default=None)\n           The edge attribute that holds the numerical value used\n           as a weight.  If None, then each edge has weight 1.\n           The degree is the sum of the edge weights adjacent to the node.\n\n        Returns\n        -------\n        nd_iter : iterator\n            The iterator returns two-tuples of (node, degree).\n\n        See Also\n        --------\n        degree\n\n        Examples\n        --------\n        >>> G = nx.path_graph(4)  # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> list(G.degree(0))  # node 0 with degree 1\n        [(0, 1)]\n        >>> list(G.degree([0, 1]))\n        [(0, 1), (1, 2)]\n\n        \"\"\"\n        if nbunch is None:\n            nodes_nbrs = (\n                (\n                    n,\n                    {\n                        v: self.all_edge_dict\n                        for v in set(self.adj) - set(self.adj[n]) - {n}\n                    },\n                )\n                for n in self.nodes()\n            )\n        elif nbunch in self:\n            nbrs = set(self.nodes()) - set(self.adj[nbunch]) - {nbunch}\n            return len(nbrs)\n        else:\n            nodes_nbrs = (\n                (\n                    n,\n                    {\n                        v: self.all_edge_dict\n                        for v in set(self.nodes()) - set(self.adj[n]) - {n}\n                    },\n                )\n                for n in self.nbunch_iter(nbunch)\n            )\n\n        if weight is None:\n            return ((n, len(nbrs)) for n, nbrs in nodes_nbrs)\n        else:\n            # AntiGraph is a ThinGraph so all edges have weight 1\n            return (\n                (n, sum((nbrs[nbr].get(weight, 1)) for nbr in nbrs))\n                for n, nbrs in nodes_nbrs\n            )\n\n    def adjacency(self):\n        \"\"\"Return an iterator of (node, adjacency set) tuples for all nodes\n           in the dense graph.\n\n        This is the fastest way to look at every edge.\n        For directed graphs, only outgoing adjacencies are included.\n\n        Returns\n        -------\n        adj_iter : iterator\n           An iterator of (node, adjacency set) for all nodes in\n           the graph.\n        \"\"\"\n        nodes = set(self.adj)\n        for n, nbrs in self.adj.items():\n            yield (n, nodes - set(nbrs) - {n})\n\n\n# Build several pairs of graphs, a regular graph\n# and the AntiGraph of it's complement, which behaves\n# as if it were the original graph.\nGnp = nx.gnp_random_graph(20, 0.8, seed=42)\nAnp = AntiGraph(nx.complement(Gnp))\nGd = nx.davis_southern_women_graph()\nAd = AntiGraph(nx.complement(Gd))\nGk = nx.karate_club_graph()\nAk = AntiGraph(nx.complement(Gk))\npairs = [(Gnp, Anp), (Gd, Ad), (Gk, Ak)]\n# test connected components\nfor G, A in pairs:\n    gc = [set(c) for c in nx.connected_components(G)]\n    ac = [set(c) for c in nx.connected_components(A)]\n    for comp in ac:\n        assert comp in gc\n# test biconnected components\nfor G, A in pairs:\n    gc = [set(c) for c in nx.biconnected_components(G)]\n    ac = [set(c) for c in nx.biconnected_components(A)]\n    for comp in ac:\n        assert comp in gc\n# test degree\nfor G, A in pairs:\n    node = list(G.nodes())[0]\n    nodes = list(G.nodes())[1:4]\n    assert G.degree(node) == A.degree(node)\n    assert sum(d for n, d in G.degree()) == sum(d for n, d in A.degree())\n    # AntiGraph is a ThinGraph, so all the weights are 1\n    assert sum(d for n, d in A.degree()) == sum(d for n, d in A.degree(weight=\"weight\"))\n    assert sum(d for n, d in G.degree(nodes)) == sum(d for n, d in A.degree(nodes))\n\npos = nx.spring_layout(G, seed=268)  # Seed for reproducible layout\nnx.draw(Gnp, pos=pos)\nplt.show()\n", "path": "examples/subclass/plot_antigraph.py"}]}