prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  AmazonCoBuy dataset typo in API document
  ## 📚 Documentation
  
  In API reference of `dgl.data.AmazonCoBuy` at https://docs.dgl.ai/en/latest/api/python/data.html#dgl.data.AmazonCoBuy,  parameter `name` has to be ‘computer’ or ‘photo’. However, it should be ‘computer**s**’ or ‘photo’ according to the code:
  
  https://github.com/dmlc/dgl/blob/fa0ee46a0146d21f46427fd9288dfe18074d6109/python/dgl/data/gnn_benckmark.py#L107-L125
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `python/dgl/data/gnn_benckmark.py`
  Content:
  ```
  1 import scipy.sparse as sp
  2 import numpy as np
  3 from dgl import graph_index, DGLGraph, transform
  4 import os
  5 from .utils import download, extract_archive, get_download_dir, _get_dgl_url
  6 
  7 __all__=["AmazonCoBuy", "Coauthor", 'CoraFull']
  8 
  9 def eliminate_self_loops(A):
  10     """Remove self-loops from the adjacency matrix."""
  11     A = A.tolil()
  12     A.setdiag(0)
  13     A = A.tocsr()
  14     A.eliminate_zeros()
  15     return A
  16 
  17 
  18 class GNNBenchmarkDataset(object):
  19     """Base Class for GNN Benchmark dataset from https://github.com/shchur/gnn-benchmark#datasets"""
  20     _url = {}
  21 
  22     def __init__(self, name):
  23         assert name.lower() in self._url, "Name not valid"
  24         self.dir = get_download_dir()
  25         self.path = os.path.join(
  26             self.dir, 'gnn_benckmark', self._url[name.lower()].split('/')[-1])
  27         download(self._url[name.lower()], path=self.path)
  28         g = self.load_npz(self.path)
  29         self.data = [g]
  30 
  31     @staticmethod
  32     def load_npz(file_name):
  33         with np.load(file_name) as loader:
  34             loader = dict(loader)
  35             num_nodes = loader['adj_shape'][0]
  36             adj_matrix = sp.csr_matrix((loader['adj_data'], loader['adj_indices'], loader['adj_indptr']),
  37                                     shape=loader['adj_shape']).tocoo()
  38 
  39             if 'attr_data' in loader:
  40                 # Attributes are stored as a sparse CSR matrix
  41                 attr_matrix = sp.csr_matrix((loader['attr_data'], loader['attr_indices'], loader['attr_indptr']),
  42                                             shape=loader['attr_shape']).todense()
  43             elif 'attr_matrix' in loader:
  44                 # Attributes are stored as a (dense) np.ndarray
  45                 attr_matrix = loader['attr_matrix']
  46             else:
  47                 attr_matrix = None
  48 
  49             if 'labels_data' in loader:
  50                 # Labels are stored as a CSR matrix
  51                 labels = sp.csr_matrix((loader['labels_data'], loader['labels_indices'], loader['labels_indptr']),
  52                                     shape=loader['labels_shape']).todense()
  53             elif 'labels' in loader:
  54                 # Labels are stored as a numpy array
  55                 labels = loader['labels']
  56             else:
  57                 labels = None
  58         g = DGLGraph()
  59         g.add_nodes(num_nodes)
  60         g.add_edges(adj_matrix.row, adj_matrix.col)
  61         g.add_edges(adj_matrix.col, adj_matrix.row)
  62         g.ndata['feat'] = attr_matrix
  63         g.ndata['label'] = labels
  64         return g     
  65 
  66     def __getitem__(self, idx):
  67         assert idx == 0, "This dataset has only one graph"
  68         return self.data[0]
  69 
  70     def __len__(self):
  71         return len(self.data)
  72 
  73 
  74 class CoraFull(GNNBenchmarkDataset):
  75     r"""
  76     Extended Cora dataset from `Deep Gaussian Embedding of Graphs: 
  77     Unsupervised Inductive Learning via Ranking`. Nodes represent paper and edges represent citations.
  78 
  79     Reference: https://github.com/shchur/gnn-benchmark#datasets
  80     """
  81     _url = {"cora_full":'https://github.com/shchur/gnn-benchmark/raw/master/data/npz/cora_full.npz'}
  82 
  83     def __init__(self):
  84         super().__init__("cora_full")
  85 
  86 
  87 class Coauthor(GNNBenchmarkDataset):
  88     r"""
  89     Coauthor CS and Coauthor Physics are co-authorship graphs based on the Microsoft Academic Graph
  90     from the KDD Cup 2016 challenge 3
  91     . Here, nodes are authors, that are connected by an edge if they
  92     co-authored a paper; node features represent paper keywords for each author’s papers, and class
  93     labels indicate most active fields of study for each author.
  94 
  95     Parameters
  96     ---------------
  97     name: str
  98       Name of the dataset, has to be 'cs' or 'physics'
  99 
  100     """
  101     _url = {
  102         'cs': "https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_cs.npz",
  103         'physics': "https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_phy.npz"
  104     }
  105 
  106 
  107 class AmazonCoBuy(GNNBenchmarkDataset):
  108     r"""
  109     Amazon Computers and Amazon Photo are segments of the Amazon co-purchase graph [McAuley
  110     et al., 2015], where nodes represent goods, edges indicate that two goods are frequently bought
  111     together, node features are bag-of-words encoded product reviews, and class labels are given by the
  112     product category.
  113 
  114     Reference: https://github.com/shchur/gnn-benchmark#datasets
  115 
  116     Parameters
  117     ---------------
  118     name: str
  119       Name of the dataset, has to be 'computer' or 'photo'
  120 
  121     """
  122     _url = {
  123         'computers': "https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_computers.npz",
  124         'photo': "https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_photo.npz"
  125     }
  126
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/python/dgl/data/gnn_benckmark.py b/python/dgl/data/gnn_benckmark.py
  --- a/python/dgl/data/gnn_benckmark.py
  +++ b/python/dgl/data/gnn_benckmark.py
  @@ -30,7 +30,7 @@
   
       @staticmethod
       def load_npz(file_name):
  -        with np.load(file_name) as loader:
  +        with np.load(file_name, allow_pickle=True) as loader:
               loader = dict(loader)
               num_nodes = loader['adj_shape'][0]
               adj_matrix = sp.csr_matrix((loader['adj_data'], loader['adj_indices'], loader['adj_indptr']),
  @@ -116,7 +116,7 @@
       Parameters
       ---------------
       name: str
  -      Name of the dataset, has to be 'computer' or 'photo'
  +      Name of the dataset, has to be 'computers' or 'photo'
   
       """
       _url = {
  
verification_info: {"golden_diff": "diff --git a/python/dgl/data/gnn_benckmark.py b/python/dgl/data/gnn_benckmark.py\n--- a/python/dgl/data/gnn_benckmark.py\n+++ b/python/dgl/data/gnn_benckmark.py\n@@ -30,7 +30,7 @@\n \n     @staticmethod\n     def load_npz(file_name):\n-        with np.load(file_name) as loader:\n+        with np.load(file_name, allow_pickle=True) as loader:\n             loader = dict(loader)\n             num_nodes = loader['adj_shape'][0]\n             adj_matrix = sp.csr_matrix((loader['adj_data'], loader['adj_indices'], loader['adj_indptr']),\n@@ -116,7 +116,7 @@\n     Parameters\n     ---------------\n     name: str\n-      Name of the dataset, has to be 'computer' or 'photo'\n+      Name of the dataset, has to be 'computers' or 'photo'\n \n     \"\"\"\n     _url = {\n", "issue": "AmazonCoBuy dataset typo in API document\n## \ud83d\udcda Documentation\r\n\r\nIn API reference of `dgl.data.AmazonCoBuy` at https://docs.dgl.ai/en/latest/api/python/data.html#dgl.data.AmazonCoBuy,  parameter `name` has to be \u2018computer\u2019 or \u2018photo\u2019. However, it should be \u2018computer**s**\u2019 or \u2018photo\u2019 according to the code:\r\n\r\nhttps://github.com/dmlc/dgl/blob/fa0ee46a0146d21f46427fd9288dfe18074d6109/python/dgl/data/gnn_benckmark.py#L107-L125\r\n\r\n\n", "before_files": [{"content": "import scipy.sparse as sp\nimport numpy as np\nfrom dgl import graph_index, DGLGraph, transform\nimport os\nfrom .utils import download, extract_archive, get_download_dir, _get_dgl_url\n\n__all__=[\"AmazonCoBuy\", \"Coauthor\", 'CoraFull']\n\ndef eliminate_self_loops(A):\n    \"\"\"Remove self-loops from the adjacency matrix.\"\"\"\n    A = A.tolil()\n    A.setdiag(0)\n    A = A.tocsr()\n    A.eliminate_zeros()\n    return A\n\n\nclass GNNBenchmarkDataset(object):\n    \"\"\"Base Class for GNN Benchmark dataset from https://github.com/shchur/gnn-benchmark#datasets\"\"\"\n    _url = {}\n\n    def __init__(self, name):\n        assert name.lower() in self._url, \"Name not valid\"\n        self.dir = get_download_dir()\n        self.path = os.path.join(\n            self.dir, 'gnn_benckmark', self._url[name.lower()].split('/')[-1])\n        download(self._url[name.lower()], path=self.path)\n        g = self.load_npz(self.path)\n        self.data = [g]\n\n    @staticmethod\n    def load_npz(file_name):\n        with np.load(file_name) as loader:\n            loader = dict(loader)\n            num_nodes = loader['adj_shape'][0]\n            adj_matrix = sp.csr_matrix((loader['adj_data'], loader['adj_indices'], loader['adj_indptr']),\n                                    shape=loader['adj_shape']).tocoo()\n\n            if 'attr_data' in loader:\n                # Attributes are stored as a sparse CSR matrix\n                attr_matrix = sp.csr_matrix((loader['attr_data'], loader['attr_indices'], loader['attr_indptr']),\n                                            shape=loader['attr_shape']).todense()\n            elif 'attr_matrix' in loader:\n                # Attributes are stored as a (dense) np.ndarray\n                attr_matrix = loader['attr_matrix']\n            else:\n                attr_matrix = None\n\n            if 'labels_data' in loader:\n                # Labels are stored as a CSR matrix\n                labels = sp.csr_matrix((loader['labels_data'], loader['labels_indices'], loader['labels_indptr']),\n                                    shape=loader['labels_shape']).todense()\n            elif 'labels' in loader:\n                # Labels are stored as a numpy array\n                labels = loader['labels']\n            else:\n                labels = None\n        g = DGLGraph()\n        g.add_nodes(num_nodes)\n        g.add_edges(adj_matrix.row, adj_matrix.col)\n        g.add_edges(adj_matrix.col, adj_matrix.row)\n        g.ndata['feat'] = attr_matrix\n        g.ndata['label'] = labels\n        return g     \n\n    def __getitem__(self, idx):\n        assert idx == 0, \"This dataset has only one graph\"\n        return self.data[0]\n\n    def __len__(self):\n        return len(self.data)\n\n\nclass CoraFull(GNNBenchmarkDataset):\n    r\"\"\"\n    Extended Cora dataset from `Deep Gaussian Embedding of Graphs: \n    Unsupervised Inductive Learning via Ranking`. Nodes represent paper and edges represent citations.\n\n    Reference: https://github.com/shchur/gnn-benchmark#datasets\n    \"\"\"\n    _url = {\"cora_full\":'https://github.com/shchur/gnn-benchmark/raw/master/data/npz/cora_full.npz'}\n\n    def __init__(self):\n        super().__init__(\"cora_full\")\n\n\nclass Coauthor(GNNBenchmarkDataset):\n    r\"\"\"\n    Coauthor CS and Coauthor Physics are co-authorship graphs based on the Microsoft Academic Graph\n    from the KDD Cup 2016 challenge 3\n    . Here, nodes are authors, that are connected by an edge if they\n    co-authored a paper; node features represent paper keywords for each author\u2019s papers, and class\n    labels indicate most active fields of study for each author.\n\n    Parameters\n    ---------------\n    name: str\n      Name of the dataset, has to be 'cs' or 'physics'\n\n    \"\"\"\n    _url = {\n        'cs': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_cs.npz\",\n        'physics': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_phy.npz\"\n    }\n\n\nclass AmazonCoBuy(GNNBenchmarkDataset):\n    r\"\"\"\n    Amazon Computers and Amazon Photo are segments of the Amazon co-purchase graph [McAuley\n    et al., 2015], where nodes represent goods, edges indicate that two goods are frequently bought\n    together, node features are bag-of-words encoded product reviews, and class labels are given by the\n    product category.\n\n    Reference: https://github.com/shchur/gnn-benchmark#datasets\n\n    Parameters\n    ---------------\n    name: str\n      Name of the dataset, has to be 'computer' or 'photo'\n\n    \"\"\"\n    _url = {\n        'computers': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_computers.npz\",\n        'photo': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_photo.npz\"\n    }\n", "path": "python/dgl/data/gnn_benckmark.py"}], "after_files": [{"content": "import scipy.sparse as sp\nimport numpy as np\nfrom dgl import graph_index, DGLGraph, transform\nimport os\nfrom .utils import download, extract_archive, get_download_dir, _get_dgl_url\n\n__all__=[\"AmazonCoBuy\", \"Coauthor\", 'CoraFull']\n\ndef eliminate_self_loops(A):\n    \"\"\"Remove self-loops from the adjacency matrix.\"\"\"\n    A = A.tolil()\n    A.setdiag(0)\n    A = A.tocsr()\n    A.eliminate_zeros()\n    return A\n\n\nclass GNNBenchmarkDataset(object):\n    \"\"\"Base Class for GNN Benchmark dataset from https://github.com/shchur/gnn-benchmark#datasets\"\"\"\n    _url = {}\n\n    def __init__(self, name):\n        assert name.lower() in self._url, \"Name not valid\"\n        self.dir = get_download_dir()\n        self.path = os.path.join(\n            self.dir, 'gnn_benckmark', self._url[name.lower()].split('/')[-1])\n        download(self._url[name.lower()], path=self.path)\n        g = self.load_npz(self.path)\n        self.data = [g]\n\n    @staticmethod\n    def load_npz(file_name):\n        with np.load(file_name, allow_pickle=True) as loader:\n            loader = dict(loader)\n            num_nodes = loader['adj_shape'][0]\n            adj_matrix = sp.csr_matrix((loader['adj_data'], loader['adj_indices'], loader['adj_indptr']),\n                                    shape=loader['adj_shape']).tocoo()\n\n            if 'attr_data' in loader:\n                # Attributes are stored as a sparse CSR matrix\n                attr_matrix = sp.csr_matrix((loader['attr_data'], loader['attr_indices'], loader['attr_indptr']),\n                                            shape=loader['attr_shape']).todense()\n            elif 'attr_matrix' in loader:\n                # Attributes are stored as a (dense) np.ndarray\n                attr_matrix = loader['attr_matrix']\n            else:\n                attr_matrix = None\n\n            if 'labels_data' in loader:\n                # Labels are stored as a CSR matrix\n                labels = sp.csr_matrix((loader['labels_data'], loader['labels_indices'], loader['labels_indptr']),\n                                    shape=loader['labels_shape']).todense()\n            elif 'labels' in loader:\n                # Labels are stored as a numpy array\n                labels = loader['labels']\n            else:\n                labels = None\n        g = DGLGraph()\n        g.add_nodes(num_nodes)\n        g.add_edges(adj_matrix.row, adj_matrix.col)\n        g.add_edges(adj_matrix.col, adj_matrix.row)\n        g.ndata['feat'] = attr_matrix\n        g.ndata['label'] = labels\n        return g     \n\n    def __getitem__(self, idx):\n        assert idx == 0, \"This dataset has only one graph\"\n        return self.data[0]\n\n    def __len__(self):\n        return len(self.data)\n\n\nclass CoraFull(GNNBenchmarkDataset):\n    r\"\"\"\n    Extended Cora dataset from `Deep Gaussian Embedding of Graphs: \n    Unsupervised Inductive Learning via Ranking`. Nodes represent paper and edges represent citations.\n\n    Reference: https://github.com/shchur/gnn-benchmark#datasets\n    \"\"\"\n    _url = {\"cora_full\":'https://github.com/shchur/gnn-benchmark/raw/master/data/npz/cora_full.npz'}\n\n    def __init__(self):\n        super().__init__(\"cora_full\")\n\n\nclass Coauthor(GNNBenchmarkDataset):\n    r\"\"\"\n    Coauthor CS and Coauthor Physics are co-authorship graphs based on the Microsoft Academic Graph\n    from the KDD Cup 2016 challenge 3\n    . Here, nodes are authors, that are connected by an edge if they\n    co-authored a paper; node features represent paper keywords for each author\u2019s papers, and class\n    labels indicate most active fields of study for each author.\n\n    Parameters\n    ---------------\n    name: str\n      Name of the dataset, has to be 'cs' or 'physics'\n\n    \"\"\"\n    _url = {\n        'cs': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_cs.npz\",\n        'physics': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/ms_academic_phy.npz\"\n    }\n\n\nclass AmazonCoBuy(GNNBenchmarkDataset):\n    r\"\"\"\n    Amazon Computers and Amazon Photo are segments of the Amazon co-purchase graph [McAuley\n    et al., 2015], where nodes represent goods, edges indicate that two goods are frequently bought\n    together, node features are bag-of-words encoded product reviews, and class labels are given by the\n    product category.\n\n    Reference: https://github.com/shchur/gnn-benchmark#datasets\n\n    Parameters\n    ---------------\n    name: str\n      Name of the dataset, has to be 'computers' or 'photo'\n\n    \"\"\"\n    _url = {\n        'computers': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_computers.npz\",\n        'photo': \"https://github.com/shchur/gnn-benchmark/raw/master/data/npz/amazon_electronics_photo.npz\"\n    }\n", "path": "python/dgl/data/gnn_benckmark.py"}]}