We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Dataset is not undirected
### 🐛 Describe the bug

Dataset is not undirected, despite passing ``to_undirected=True`` flag.

```python
# !pip install pyg-nightly

from torch_geometric.datasets import CitationFull
from torch_geometric.utils import is_undirected

edge_index = CitationFull(root=".", name="Cora_ML", to_undirected=True).edge_index
is_undirected(edge_index)
```
The above outputs: *False*

### Environment

* PyG version: 2.4.0.dev20231010
* PyTorch version: 2.0.1+cu118
* OS: Colab
* Python version: 3.10.12
* CUDA/cuDNN version: 11.8
* How you installed PyTorch and PyG (`conda`, `pip`, source): pip
* Any other relevant information (*e.g.*, version of `torch-scatter`):


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `torch_geometric/datasets/citation_full.py`
Content:
```
1 import os.path as osp
2 from typing import Callable, Optional
3 
4 import torch
5 
6 from torch_geometric.data import InMemoryDataset, download_url
7 from torch_geometric.io import read_npz
8 
9 
10 class CitationFull(InMemoryDataset):
11     r"""The full citation network datasets from the
12     `"Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via
13     Ranking" <https://arxiv.org/abs/1707.03815>`_ paper.
14     Nodes represent documents and edges represent citation links.
15     Datasets include :obj:`"Cora"`, :obj:`"Cora_ML"`, :obj:`"CiteSeer"`,
16     :obj:`"DBLP"`, :obj:`"PubMed"`.
17 
18     Args:
19         root (str): Root directory where the dataset should be saved.
20         name (str): The name of the dataset (:obj:`"Cora"`, :obj:`"Cora_ML"`
21             :obj:`"CiteSeer"`, :obj:`"DBLP"`, :obj:`"PubMed"`).
22         transform (callable, optional): A function/transform that takes in an
23             :obj:`torch_geometric.data.Data` object and returns a transformed
24             version. The data object will be transformed before every access.
25             (default: :obj:`None`)
26         pre_transform (callable, optional): A function/transform that takes in
27             an :obj:`torch_geometric.data.Data` object and returns a
28             transformed version. The data object will be transformed before
29             being saved to disk. (default: :obj:`None`)
30         to_undirected (bool, optional): Whether the original graph is
31             converted to an undirected one. (default: :obj:`True`)
32 
33     **STATS:**
34 
35     .. list-table::
36         :widths: 10 10 10 10 10
37         :header-rows: 1
38 
39         * - Name
40           - #nodes
41           - #edges
42           - #features
43           - #classes
44         * - Cora
45           - 19,793
46           - 126,842
47           - 8,710
48           - 70
49         * - Cora_ML
50           - 2,995
51           - 16,316
52           - 2,879
53           - 7
54         * - CiteSeer
55           - 4,230
56           - 10,674
57           - 602
58           - 6
59         * - DBLP
60           - 17,716
61           - 105,734
62           - 1,639
63           - 4
64         * - PubMed
65           - 19,717
66           - 88,648
67           - 500
68           - 3
69     """
70 
71     url = 'https://github.com/abojchevski/graph2gauss/raw/master/data/{}.npz'
72 
73     def __init__(
74         self,
75         root: str,
76         name: str,
77         transform: Optional[Callable] = None,
78         pre_transform: Optional[Callable] = None,
79         to_undirected: bool = True,
80     ):
81         self.name = name.lower()
82         self.to_undirected = to_undirected
83         assert self.name in ['cora', 'cora_ml', 'citeseer', 'dblp', 'pubmed']
84         super().__init__(root, transform, pre_transform)
85         self.data, self.slices = torch.load(self.processed_paths[0])
86 
87     @property
88     def raw_dir(self) -> str:
89         return osp.join(self.root, self.name, 'raw')
90 
91     @property
92     def processed_dir(self) -> str:
93         return osp.join(self.root, self.name, 'processed')
94 
95     @property
96     def raw_file_names(self) -> str:
97         return f'{self.name}.npz'
98 
99     @property
100     def processed_file_names(self) -> str:
101         return 'data.pt'
102 
103     def download(self):
104         download_url(self.url.format(self.name), self.raw_dir)
105 
106     def process(self):
107         data = read_npz(self.raw_paths[0], to_undirected=self.to_undirected)
108         data = data if self.pre_transform is None else self.pre_transform(data)
109         data, slices = self.collate([data])
110         torch.save((data, slices), self.processed_paths[0])
111 
112     def __repr__(self) -> str:
113         return f'{self.name.capitalize()}Full()'
114 
115 
116 class CoraFull(CitationFull):
117     r"""Alias for :class:`~torch_geometric.datasets.CitationFull` with
118     :obj:`name="Cora"`.
119 
120     **STATS:**
121 
122     .. list-table::
123         :widths: 10 10 10 10
124         :header-rows: 1
125 
126         * - #nodes
127           - #edges
128           - #features
129           - #classes
130         * - 19,793
131           - 126,842
132           - 8,710
133           - 70
134     """
135     def __init__(self, root: str, transform: Optional[Callable] = None,
136                  pre_transform: Optional[Callable] = None):
137         super().__init__(root, 'cora', transform, pre_transform)
138 
139     def download(self):
140         super().download()
141 
142     def process(self):
143         super().process()
144
```
--- 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/torch_geometric/datasets/citation_full.py b/torch_geometric/datasets/citation_full.py
--- a/torch_geometric/datasets/citation_full.py
+++ b/torch_geometric/datasets/citation_full.py
@@ -98,7 +98,8 @@
 
     @property
     def processed_file_names(self) -> str:
-        return 'data.pt'
+        suffix = 'undirected' if self.to_undirected else 'directed'
+        return f'data_{suffix}.pt'
 
     def download(self):
         download_url(self.url.format(self.name), self.raw_dir)

{"golden_diff": "diff --git a/torch_geometric/datasets/citation_full.py b/torch_geometric/datasets/citation_full.py\n--- a/torch_geometric/datasets/citation_full.py\n+++ b/torch_geometric/datasets/citation_full.py\n@@ -98,7 +98,8 @@\n \n     @property\n     def processed_file_names(self) -> str:\n-        return 'data.pt'\n+        suffix = 'undirected' if self.to_undirected else 'directed'\n+        return f'data_{suffix}.pt'\n \n     def download(self):\n         download_url(self.url.format(self.name), self.raw_dir)\n", "issue": "Dataset is not undirected\n### \ud83d\udc1b Describe the bug\n\nDataset is not undirected, despite passing ``to_undirected=True`` flag.\r\n\r\n```python\r\n# !pip install pyg-nightly\r\n\r\nfrom torch_geometric.datasets import CitationFull\r\nfrom torch_geometric.utils import is_undirected\r\n\r\nedge_index = CitationFull(root=\".\", name=\"Cora_ML\", to_undirected=True).edge_index\r\nis_undirected(edge_index)\r\n```\r\nThe above outputs: *False*\n\n### Environment\n\n* PyG version: 2.4.0.dev20231010\r\n* PyTorch version: 2.0.1+cu118\r\n* OS: Colab\r\n* Python version: 3.10.12\r\n* CUDA/cuDNN version: 11.8\r\n* How you installed PyTorch and PyG (`conda`, `pip`, source): pip\r\n* Any other relevant information (*e.g.*, version of `torch-scatter`):\r\n\n", "before_files": [{"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n    r\"\"\"The full citation network datasets from the\n    `\"Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via\n    Ranking\" <https://arxiv.org/abs/1707.03815>`_ paper.\n    Nodes represent documents and edges represent citation links.\n    Datasets include :obj:`\"Cora\"`, :obj:`\"Cora_ML\"`, :obj:`\"CiteSeer\"`,\n    :obj:`\"DBLP\"`, :obj:`\"PubMed\"`.\n\n    Args:\n        root (str): Root directory where the dataset should be saved.\n        name (str): The name of the dataset (:obj:`\"Cora\"`, :obj:`\"Cora_ML\"`\n            :obj:`\"CiteSeer\"`, :obj:`\"DBLP\"`, :obj:`\"PubMed\"`).\n        transform (callable, optional): A function/transform that takes in an\n            :obj:`torch_geometric.data.Data` object and returns a transformed\n            version. The data object will be transformed before every access.\n            (default: :obj:`None`)\n        pre_transform (callable, optional): A function/transform that takes in\n            an :obj:`torch_geometric.data.Data` object and returns a\n            transformed version. The data object will be transformed before\n            being saved to disk. (default: :obj:`None`)\n        to_undirected (bool, optional): Whether the original graph is\n            converted to an undirected one. (default: :obj:`True`)\n\n    **STATS:**\n\n    .. list-table::\n        :widths: 10 10 10 10 10\n        :header-rows: 1\n\n        * - Name\n          - #nodes\n          - #edges\n          - #features\n          - #classes\n        * - Cora\n          - 19,793\n          - 126,842\n          - 8,710\n          - 70\n        * - Cora_ML\n          - 2,995\n          - 16,316\n          - 2,879\n          - 7\n        * - CiteSeer\n          - 4,230\n          - 10,674\n          - 602\n          - 6\n        * - DBLP\n          - 17,716\n          - 105,734\n          - 1,639\n          - 4\n        * - PubMed\n          - 19,717\n          - 88,648\n          - 500\n          - 3\n    \"\"\"\n\n    url = 'https://github.com/abojchevski/graph2gauss/raw/master/data/{}.npz'\n\n    def __init__(\n        self,\n        root: str,\n        name: str,\n        transform: Optional[Callable] = None,\n        pre_transform: Optional[Callable] = None,\n        to_undirected: bool = True,\n    ):\n        self.name = name.lower()\n        self.to_undirected = to_undirected\n        assert self.name in ['cora', 'cora_ml', 'citeseer', 'dblp', 'pubmed']\n        super().__init__(root, transform, pre_transform)\n        self.data, self.slices = torch.load(self.processed_paths[0])\n\n    @property\n    def raw_dir(self) -> str:\n        return osp.join(self.root, self.name, 'raw')\n\n    @property\n    def processed_dir(self) -> str:\n        return osp.join(self.root, self.name, 'processed')\n\n    @property\n    def raw_file_names(self) -> str:\n        return f'{self.name}.npz'\n\n    @property\n    def processed_file_names(self) -> str:\n        return 'data.pt'\n\n    def download(self):\n        download_url(self.url.format(self.name), self.raw_dir)\n\n    def process(self):\n        data = read_npz(self.raw_paths[0], to_undirected=self.to_undirected)\n        data = data if self.pre_transform is None else self.pre_transform(data)\n        data, slices = self.collate([data])\n        torch.save((data, slices), self.processed_paths[0])\n\n    def __repr__(self) -> str:\n        return f'{self.name.capitalize()}Full()'\n\n\nclass CoraFull(CitationFull):\n    r\"\"\"Alias for :class:`~torch_geometric.datasets.CitationFull` with\n    :obj:`name=\"Cora\"`.\n\n    **STATS:**\n\n    .. list-table::\n        :widths: 10 10 10 10\n        :header-rows: 1\n\n        * - #nodes\n          - #edges\n          - #features\n          - #classes\n        * - 19,793\n          - 126,842\n          - 8,710\n          - 70\n    \"\"\"\n    def __init__(self, root: str, transform: Optional[Callable] = None,\n                 pre_transform: Optional[Callable] = None):\n        super().__init__(root, 'cora', transform, pre_transform)\n\n    def download(self):\n        super().download()\n\n    def process(self):\n        super().process()\n", "path": "torch_geometric/datasets/citation_full.py"}], "after_files": [{"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n    r\"\"\"The full citation network datasets from the\n    `\"Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via\n    Ranking\" <https://arxiv.org/abs/1707.03815>`_ paper.\n    Nodes represent documents and edges represent citation links.\n    Datasets include :obj:`\"Cora\"`, :obj:`\"Cora_ML\"`, :obj:`\"CiteSeer\"`,\n    :obj:`\"DBLP\"`, :obj:`\"PubMed\"`.\n\n    Args:\n        root (str): Root directory where the dataset should be saved.\n        name (str): The name of the dataset (:obj:`\"Cora\"`, :obj:`\"Cora_ML\"`\n            :obj:`\"CiteSeer\"`, :obj:`\"DBLP\"`, :obj:`\"PubMed\"`).\n        transform (callable, optional): A function/transform that takes in an\n            :obj:`torch_geometric.data.Data` object and returns a transformed\n            version. The data object will be transformed before every access.\n            (default: :obj:`None`)\n        pre_transform (callable, optional): A function/transform that takes in\n            an :obj:`torch_geometric.data.Data` object and returns a\n            transformed version. The data object will be transformed before\n            being saved to disk. (default: :obj:`None`)\n        to_undirected (bool, optional): Whether the original graph is\n            converted to an undirected one. (default: :obj:`True`)\n\n    **STATS:**\n\n    .. list-table::\n        :widths: 10 10 10 10 10\n        :header-rows: 1\n\n        * - Name\n          - #nodes\n          - #edges\n          - #features\n          - #classes\n        * - Cora\n          - 19,793\n          - 126,842\n          - 8,710\n          - 70\n        * - Cora_ML\n          - 2,995\n          - 16,316\n          - 2,879\n          - 7\n        * - CiteSeer\n          - 4,230\n          - 10,674\n          - 602\n          - 6\n        * - DBLP\n          - 17,716\n          - 105,734\n          - 1,639\n          - 4\n        * - PubMed\n          - 19,717\n          - 88,648\n          - 500\n          - 3\n    \"\"\"\n\n    url = 'https://github.com/abojchevski/graph2gauss/raw/master/data/{}.npz'\n\n    def __init__(\n        self,\n        root: str,\n        name: str,\n        transform: Optional[Callable] = None,\n        pre_transform: Optional[Callable] = None,\n        to_undirected: bool = True,\n    ):\n        self.name = name.lower()\n        self.to_undirected = to_undirected\n        assert self.name in ['cora', 'cora_ml', 'citeseer', 'dblp', 'pubmed']\n        super().__init__(root, transform, pre_transform)\n        self.data, self.slices = torch.load(self.processed_paths[0])\n\n    @property\n    def raw_dir(self) -> str:\n        return osp.join(self.root, self.name, 'raw')\n\n    @property\n    def processed_dir(self) -> str:\n        return osp.join(self.root, self.name, 'processed')\n\n    @property\n    def raw_file_names(self) -> str:\n        return f'{self.name}.npz'\n\n    @property\n    def processed_file_names(self) -> str:\n        suffix = 'undirected' if self.to_undirected else 'directed'\n        return f'data_{suffix}.pt'\n\n    def download(self):\n        download_url(self.url.format(self.name), self.raw_dir)\n\n    def process(self):\n        data = read_npz(self.raw_paths[0], to_undirected=self.to_undirected)\n        data = data if self.pre_transform is None else self.pre_transform(data)\n        data, slices = self.collate([data])\n        torch.save((data, slices), self.processed_paths[0])\n\n    def __repr__(self) -> str:\n        return f'{self.name.capitalize()}Full()'\n\n\nclass CoraFull(CitationFull):\n    r\"\"\"Alias for :class:`~torch_geometric.datasets.CitationFull` with\n    :obj:`name=\"Cora\"`.\n\n    **STATS:**\n\n    .. list-table::\n        :widths: 10 10 10 10\n        :header-rows: 1\n\n        * - #nodes\n          - #edges\n          - #features\n          - #classes\n        * - 19,793\n          - 126,842\n          - 8,710\n          - 70\n    \"\"\"\n    def __init__(self, root: str, transform: Optional[Callable] = None,\n                 pre_transform: Optional[Callable] = None):\n        super().__init__(root, 'cora', transform, pre_transform)\n\n    def download(self):\n        super().download()\n\n    def process(self):\n        super().process()\n", "path": "torch_geometric/datasets/citation_full.py"}]}