We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
PatternNet download link is broken
### Description

[PatterNet dataset](https://torchgeo.readthedocs.io/en/stable/_modules/torchgeo/datasets/patternnet.html#PatternNet) [download link ](https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K) is broken.

It seems it is officially hosted [here](https://nuisteducn1-my.sharepoint.com/:u:/g/personal/zhouwx_nuist_edu_cn/EYSPYqBztbBBqS27B7uM_mEB3R9maNJze8M1Qg9Q6cnPBQ?e=MSf977). Was someone mirroring it on a personal Google Drive? 

### Steps to reproduce

```
from torchgeo.datasets import PatternNet

patternet = PatternNet(root='./', transforms=None, download=True, checksum=True)
```

### Version

0.5.2

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `torchgeo/datasets/patternnet.py`
Content:
```
1 # Copyright (c) Microsoft Corporation. All rights reserved.
2 # Licensed under the MIT License.
3 
4 """PatternNet dataset."""
5 
6 import os
7 from collections.abc import Callable
8 from typing import cast
9 
10 import matplotlib.pyplot as plt
11 from matplotlib.figure import Figure
12 from torch import Tensor
13 
14 from .errors import DatasetNotFoundError
15 from .geo import NonGeoClassificationDataset
16 from .utils import download_url, extract_archive
17 
18 
19 class PatternNet(NonGeoClassificationDataset):
20     """PatternNet dataset.
21 
22     The `PatternNet <https://sites.google.com/view/zhouwx/dataset>`__
23     dataset is a dataset for remote sensing scene classification and image retrieval.
24 
25     Dataset features:
26 
27     * 30,400 images with 6-50 cm per pixel resolution (256x256 px)
28     * three spectral bands - RGB
29     * 38 scene classes, 800 images per class
30 
31     Dataset format:
32 
33     * images are three-channel jpgs
34 
35     Dataset classes:
36 
37     0. airplane
38     1. baseball_field
39     2. basketball_court
40     3. beach
41     4. bridge
42     5. cemetery
43     6. chaparral
44     7. christmas_tree_farm
45     8. closed_road
46     9. coastal_mansion
47     10. crosswalk
48     11. dense_residential
49     12. ferry_terminal
50     13. football_field
51     14. forest
52     15. freeway
53     16. golf_course
54     17. harbor
55     18. intersection
56     19. mobile_home_park
57     20. nursing_home
58     21. oil_gas_field
59     22. oil_well
60     23. overpass
61     24. parking_lot
62     25. parking_space
63     26. railway
64     27. river
65     28. runway
66     29. runway_marking
67     30. shipping_yard
68     31. solar_panel
69     32. sparse_residential
70     33. storage_tank
71     34. swimming_pool
72     35. tennis_court
73     36. transformer_station
74     37. wastewater_treatment_plant
75 
76     If you use this dataset in your research, please cite the following paper:
77 
78     * https://doi.org/10.1016/j.isprsjprs.2018.01.004
79     """
80 
81     url = 'https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K'
82     md5 = '96d54b3224c5350a98d55d5a7e6984ad'
83     filename = 'PatternNet.zip'
84     directory = os.path.join('PatternNet', 'images')
85 
86     def __init__(
87         self,
88         root: str = 'data',
89         transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None,
90         download: bool = False,
91         checksum: bool = False,
92     ) -> None:
93         """Initialize a new PatternNet dataset instance.
94 
95         Args:
96             root: root directory where dataset can be found
97             transforms: a function/transform that takes input sample and its target as
98                 entry and returns a transformed version
99             download: if True, download dataset and store it in the root directory
100             checksum: if True, check the MD5 of the downloaded files (may be slow)
101 
102         Raises:
103             DatasetNotFoundError: If dataset is not found and *download* is False.
104         """
105         self.root = root
106         self.download = download
107         self.checksum = checksum
108         self._verify()
109         super().__init__(root=os.path.join(root, self.directory), transforms=transforms)
110 
111     def _verify(self) -> None:
112         """Verify the integrity of the dataset."""
113         # Check if the files already exist
114         filepath = os.path.join(self.root, self.directory)
115         if os.path.exists(filepath):
116             return
117 
118         # Check if zip file already exists (if so then extract)
119         filepath = os.path.join(self.root, self.filename)
120         if os.path.exists(filepath):
121             self._extract()
122             return
123 
124         # Check if the user requested to download the dataset
125         if not self.download:
126             raise DatasetNotFoundError(self)
127 
128         # Download and extract the dataset
129         self._download()
130         self._extract()
131 
132     def _download(self) -> None:
133         """Download the dataset."""
134         download_url(
135             self.url,
136             self.root,
137             filename=self.filename,
138             md5=self.md5 if self.checksum else None,
139         )
140 
141     def _extract(self) -> None:
142         """Extract the dataset."""
143         filepath = os.path.join(self.root, self.filename)
144         extract_archive(filepath)
145 
146     def plot(
147         self,
148         sample: dict[str, Tensor],
149         show_titles: bool = True,
150         suptitle: str | None = None,
151     ) -> Figure:
152         """Plot a sample from the dataset.
153 
154         Args:
155             sample: a sample returned by :meth:`NonGeoClassificationDataset.__getitem__`
156             show_titles: flag indicating whether to show titles above each panel
157             suptitle: optional suptitle to use for figure
158 
159         Returns:
160             a matplotlib Figure with the rendered sample
161 
162         .. versionadded:: 0.2
163         """
164         image, label = sample['image'], cast(int, sample['label'].item())
165 
166         showing_predictions = 'prediction' in sample
167         if showing_predictions:
168             prediction = cast(int, sample['prediction'].item())
169 
170         fig, ax = plt.subplots(1, 1, figsize=(10, 10))
171 
172         ax.imshow(image.permute(1, 2, 0))
173         ax.axis('off')
174 
175         if show_titles:
176             title = f'Label: {self.classes[label]}'
177             if showing_predictions:
178                 title += f'\nPrediction: {self.classes[prediction]}'
179             ax.set_title(title)
180 
181         if suptitle is not None:
182             plt.suptitle(suptitle)
183 
184         return fig
185
```
--- 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/torchgeo/datasets/patternnet.py b/torchgeo/datasets/patternnet.py
--- a/torchgeo/datasets/patternnet.py
+++ b/torchgeo/datasets/patternnet.py
@@ -78,7 +78,7 @@
     * https://doi.org/10.1016/j.isprsjprs.2018.01.004
     """
 
-    url = 'https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K'
+    url = 'https://hf.co/datasets/torchgeo/PatternNet/resolve/2dbd901b00e301967a5c5146b25454f5d3455ad0/PatternNet.zip'
     md5 = '96d54b3224c5350a98d55d5a7e6984ad'
     filename = 'PatternNet.zip'
     directory = os.path.join('PatternNet', 'images')

{"golden_diff": "diff --git a/torchgeo/datasets/patternnet.py b/torchgeo/datasets/patternnet.py\n--- a/torchgeo/datasets/patternnet.py\n+++ b/torchgeo/datasets/patternnet.py\n@@ -78,7 +78,7 @@\n     * https://doi.org/10.1016/j.isprsjprs.2018.01.004\n     \"\"\"\n \n-    url = 'https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K'\n+    url = 'https://hf.co/datasets/torchgeo/PatternNet/resolve/2dbd901b00e301967a5c5146b25454f5d3455ad0/PatternNet.zip'\n     md5 = '96d54b3224c5350a98d55d5a7e6984ad'\n     filename = 'PatternNet.zip'\n     directory = os.path.join('PatternNet', 'images')\n", "issue": "PatternNet download link is broken\n### Description\r\n\r\n[PatterNet dataset](https://torchgeo.readthedocs.io/en/stable/_modules/torchgeo/datasets/patternnet.html#PatternNet) [download link ](https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K) is broken.\r\n\r\nIt seems it is officially hosted [here](https://nuisteducn1-my.sharepoint.com/:u:/g/personal/zhouwx_nuist_edu_cn/EYSPYqBztbBBqS27B7uM_mEB3R9maNJze8M1Qg9Q6cnPBQ?e=MSf977). Was someone mirroring it on a personal Google Drive? \r\n\r\n### Steps to reproduce\r\n\r\n```\r\nfrom torchgeo.datasets import PatternNet\r\n\r\npatternet = PatternNet(root='./', transforms=None, download=True, checksum=True)\r\n```\r\n\r\n### Version\r\n\r\n0.5.2\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"PatternNet dataset.\"\"\"\n\nimport os\nfrom collections.abc import Callable\nfrom typing import cast\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.figure import Figure\nfrom torch import Tensor\n\nfrom .errors import DatasetNotFoundError\nfrom .geo import NonGeoClassificationDataset\nfrom .utils import download_url, extract_archive\n\n\nclass PatternNet(NonGeoClassificationDataset):\n    \"\"\"PatternNet dataset.\n\n    The `PatternNet <https://sites.google.com/view/zhouwx/dataset>`__\n    dataset is a dataset for remote sensing scene classification and image retrieval.\n\n    Dataset features:\n\n    * 30,400 images with 6-50 cm per pixel resolution (256x256 px)\n    * three spectral bands - RGB\n    * 38 scene classes, 800 images per class\n\n    Dataset format:\n\n    * images are three-channel jpgs\n\n    Dataset classes:\n\n    0. airplane\n    1. baseball_field\n    2. basketball_court\n    3. beach\n    4. bridge\n    5. cemetery\n    6. chaparral\n    7. christmas_tree_farm\n    8. closed_road\n    9. coastal_mansion\n    10. crosswalk\n    11. dense_residential\n    12. ferry_terminal\n    13. football_field\n    14. forest\n    15. freeway\n    16. golf_course\n    17. harbor\n    18. intersection\n    19. mobile_home_park\n    20. nursing_home\n    21. oil_gas_field\n    22. oil_well\n    23. overpass\n    24. parking_lot\n    25. parking_space\n    26. railway\n    27. river\n    28. runway\n    29. runway_marking\n    30. shipping_yard\n    31. solar_panel\n    32. sparse_residential\n    33. storage_tank\n    34. swimming_pool\n    35. tennis_court\n    36. transformer_station\n    37. wastewater_treatment_plant\n\n    If you use this dataset in your research, please cite the following paper:\n\n    * https://doi.org/10.1016/j.isprsjprs.2018.01.004\n    \"\"\"\n\n    url = 'https://drive.google.com/file/d/127lxXYqzO6Bd0yZhvEbgIfz95HaEnr9K'\n    md5 = '96d54b3224c5350a98d55d5a7e6984ad'\n    filename = 'PatternNet.zip'\n    directory = os.path.join('PatternNet', 'images')\n\n    def __init__(\n        self,\n        root: str = 'data',\n        transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None,\n        download: bool = False,\n        checksum: bool = False,\n    ) -> None:\n        \"\"\"Initialize a new PatternNet dataset instance.\n\n        Args:\n            root: root directory where dataset can be found\n            transforms: a function/transform that takes input sample and its target as\n                entry and returns a transformed version\n            download: if True, download dataset and store it in the root directory\n            checksum: if True, check the MD5 of the downloaded files (may be slow)\n\n        Raises:\n            DatasetNotFoundError: If dataset is not found and *download* is False.\n        \"\"\"\n        self.root = root\n        self.download = download\n        self.checksum = checksum\n        self._verify()\n        super().__init__(root=os.path.join(root, self.directory), transforms=transforms)\n\n    def _verify(self) -> None:\n        \"\"\"Verify the integrity of the dataset.\"\"\"\n        # Check if the files already exist\n        filepath = os.path.join(self.root, self.directory)\n        if os.path.exists(filepath):\n            return\n\n        # Check if zip file already exists (if so then extract)\n        filepath = os.path.join(self.root, self.filename)\n        if os.path.exists(filepath):\n            self._extract()\n            return\n\n        # Check if the user requested to download the dataset\n        if not self.download:\n            raise DatasetNotFoundError(self)\n\n        # Download and extract the dataset\n        self._download()\n        self._extract()\n\n    def _download(self) -> None:\n        \"\"\"Download the dataset.\"\"\"\n        download_url(\n            self.url,\n            self.root,\n            filename=self.filename,\n            md5=self.md5 if self.checksum else None,\n        )\n\n    def _extract(self) -> None:\n        \"\"\"Extract the dataset.\"\"\"\n        filepath = os.path.join(self.root, self.filename)\n        extract_archive(filepath)\n\n    def plot(\n        self,\n        sample: dict[str, Tensor],\n        show_titles: bool = True,\n        suptitle: str | None = None,\n    ) -> Figure:\n        \"\"\"Plot a sample from the dataset.\n\n        Args:\n            sample: a sample returned by :meth:`NonGeoClassificationDataset.__getitem__`\n            show_titles: flag indicating whether to show titles above each panel\n            suptitle: optional suptitle to use for figure\n\n        Returns:\n            a matplotlib Figure with the rendered sample\n\n        .. versionadded:: 0.2\n        \"\"\"\n        image, label = sample['image'], cast(int, sample['label'].item())\n\n        showing_predictions = 'prediction' in sample\n        if showing_predictions:\n            prediction = cast(int, sample['prediction'].item())\n\n        fig, ax = plt.subplots(1, 1, figsize=(10, 10))\n\n        ax.imshow(image.permute(1, 2, 0))\n        ax.axis('off')\n\n        if show_titles:\n            title = f'Label: {self.classes[label]}'\n            if showing_predictions:\n                title += f'\\nPrediction: {self.classes[prediction]}'\n            ax.set_title(title)\n\n        if suptitle is not None:\n            plt.suptitle(suptitle)\n\n        return fig\n", "path": "torchgeo/datasets/patternnet.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"PatternNet dataset.\"\"\"\n\nimport os\nfrom collections.abc import Callable\nfrom typing import cast\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.figure import Figure\nfrom torch import Tensor\n\nfrom .errors import DatasetNotFoundError\nfrom .geo import NonGeoClassificationDataset\nfrom .utils import download_url, extract_archive\n\n\nclass PatternNet(NonGeoClassificationDataset):\n    \"\"\"PatternNet dataset.\n\n    The `PatternNet <https://sites.google.com/view/zhouwx/dataset>`__\n    dataset is a dataset for remote sensing scene classification and image retrieval.\n\n    Dataset features:\n\n    * 30,400 images with 6-50 cm per pixel resolution (256x256 px)\n    * three spectral bands - RGB\n    * 38 scene classes, 800 images per class\n\n    Dataset format:\n\n    * images are three-channel jpgs\n\n    Dataset classes:\n\n    0. airplane\n    1. baseball_field\n    2. basketball_court\n    3. beach\n    4. bridge\n    5. cemetery\n    6. chaparral\n    7. christmas_tree_farm\n    8. closed_road\n    9. coastal_mansion\n    10. crosswalk\n    11. dense_residential\n    12. ferry_terminal\n    13. football_field\n    14. forest\n    15. freeway\n    16. golf_course\n    17. harbor\n    18. intersection\n    19. mobile_home_park\n    20. nursing_home\n    21. oil_gas_field\n    22. oil_well\n    23. overpass\n    24. parking_lot\n    25. parking_space\n    26. railway\n    27. river\n    28. runway\n    29. runway_marking\n    30. shipping_yard\n    31. solar_panel\n    32. sparse_residential\n    33. storage_tank\n    34. swimming_pool\n    35. tennis_court\n    36. transformer_station\n    37. wastewater_treatment_plant\n\n    If you use this dataset in your research, please cite the following paper:\n\n    * https://doi.org/10.1016/j.isprsjprs.2018.01.004\n    \"\"\"\n\n    url = 'https://hf.co/datasets/torchgeo/PatternNet/resolve/2dbd901b00e301967a5c5146b25454f5d3455ad0/PatternNet.zip'\n    md5 = '96d54b3224c5350a98d55d5a7e6984ad'\n    filename = 'PatternNet.zip'\n    directory = os.path.join('PatternNet', 'images')\n\n    def __init__(\n        self,\n        root: str = 'data',\n        transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None,\n        download: bool = False,\n        checksum: bool = False,\n    ) -> None:\n        \"\"\"Initialize a new PatternNet dataset instance.\n\n        Args:\n            root: root directory where dataset can be found\n            transforms: a function/transform that takes input sample and its target as\n                entry and returns a transformed version\n            download: if True, download dataset and store it in the root directory\n            checksum: if True, check the MD5 of the downloaded files (may be slow)\n\n        Raises:\n            DatasetNotFoundError: If dataset is not found and *download* is False.\n        \"\"\"\n        self.root = root\n        self.download = download\n        self.checksum = checksum\n        self._verify()\n        super().__init__(root=os.path.join(root, self.directory), transforms=transforms)\n\n    def _verify(self) -> None:\n        \"\"\"Verify the integrity of the dataset.\"\"\"\n        # Check if the files already exist\n        filepath = os.path.join(self.root, self.directory)\n        if os.path.exists(filepath):\n            return\n\n        # Check if zip file already exists (if so then extract)\n        filepath = os.path.join(self.root, self.filename)\n        if os.path.exists(filepath):\n            self._extract()\n            return\n\n        # Check if the user requested to download the dataset\n        if not self.download:\n            raise DatasetNotFoundError(self)\n\n        # Download and extract the dataset\n        self._download()\n        self._extract()\n\n    def _download(self) -> None:\n        \"\"\"Download the dataset.\"\"\"\n        download_url(\n            self.url,\n            self.root,\n            filename=self.filename,\n            md5=self.md5 if self.checksum else None,\n        )\n\n    def _extract(self) -> None:\n        \"\"\"Extract the dataset.\"\"\"\n        filepath = os.path.join(self.root, self.filename)\n        extract_archive(filepath)\n\n    def plot(\n        self,\n        sample: dict[str, Tensor],\n        show_titles: bool = True,\n        suptitle: str | None = None,\n    ) -> Figure:\n        \"\"\"Plot a sample from the dataset.\n\n        Args:\n            sample: a sample returned by :meth:`NonGeoClassificationDataset.__getitem__`\n            show_titles: flag indicating whether to show titles above each panel\n            suptitle: optional suptitle to use for figure\n\n        Returns:\n            a matplotlib Figure with the rendered sample\n\n        .. versionadded:: 0.2\n        \"\"\"\n        image, label = sample['image'], cast(int, sample['label'].item())\n\n        showing_predictions = 'prediction' in sample\n        if showing_predictions:\n            prediction = cast(int, sample['prediction'].item())\n\n        fig, ax = plt.subplots(1, 1, figsize=(10, 10))\n\n        ax.imshow(image.permute(1, 2, 0))\n        ax.axis('off')\n\n        if show_titles:\n            title = f'Label: {self.classes[label]}'\n            if showing_predictions:\n                title += f'\\nPrediction: {self.classes[prediction]}'\n            ax.set_title(title)\n\n        if suptitle is not None:\n            plt.suptitle(suptitle)\n\n        return fig\n", "path": "torchgeo/datasets/patternnet.py"}]}