We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
darwin-py 0.7.11 causing `MissingConfig` issues
When I try using 0.7.11, I am getting an error when I run `dataset.pull`

It appears to be something with the release.py `download_zip` code passing config.yaml.  I checked my .darwin folder and I don't see a config.yaml so I'm sure that's why it's causing an issue, but not sure where that is supposed to come from.  

Here's a reproducible version you should be able to use
```
import darwin; print(darwin.__version__)
from darwin.client import Client

API_KEY = *your_key_here*
client = Client.from_api_key(API_KEY)

datasets={d.name:d for d in client.list_remote_datasets()}
dataset=datasets["kevin-tmp"]

release = dataset.get_release()
dataset.pull(release=release)
```

stack trace in 0.7.11: 
```
---------------------------------------------------------------------------
MissingConfig                             Traceback (most recent call last)
/tmp/ipykernel_277/279924910.py in <module>
     10 
     11 release = dataset.get_release()
---> 12 dataset.pull(release=release)

/opt/conda/lib/python3.7/site-packages/darwin/dataset/remote_dataset.py in pull(self, release, blocking, multi_threaded, only_annotations, force_replace, remove_extra, subset_filter_annotations_function, subset_folder_name, use_folders, video_frames)
    309             tmp_dir = Path(tmp_dir_str)
    310             # Download the release from Darwin
--> 311             zip_file_path = release.download_zip(tmp_dir / "dataset.zip")
    312             with zipfile.ZipFile(zip_file_path) as z:
    313                 # Extract annotations

/opt/conda/lib/python3.7/site-packages/darwin/dataset/release.py in download_zip(self, path)
    195 
    196         config_path: Path = Path.home() / ".darwin" / "config.yaml"
--> 197         client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)
    198 
    199         data: Response = client.fetch_binary(self.url)

/opt/conda/lib/python3.7/site-packages/darwin/client.py in from_config(cls, config_path, team_slug)
    836         """
    837         if not config_path.exists():
--> 838             raise MissingConfig()
    839         config = Config(config_path)
    840 

MissingConfig:
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `darwin/version/__init__.py`
Content:
```
1 __version__ = "0.7.11"
2
```

Path: `darwin/dataset/release.py`
Content:
```
1 import datetime
2 from pathlib import Path
3 from typing import Any, Dict, Optional
4 
5 from darwin.dataset.identifier import DatasetIdentifier
6 from requests import Response
7 
8 
9 class Release:
10     """
11     Represents a release/export. Releases created this way can only contain items with 'completed'
12     status.
13 
14     Parameters
15     ----------
16     dataset_slug : str
17         The slug of the dataset.
18     team_slug : str
19         the slug of the team.
20     version : str
21         The version of the ``Release``.
22     name : str
23         The name of the ``Release``.
24     url : Optional[str]
25         The full url used to download the ``Release``.
26     export_date : datetime.datetime
27         The ``datetime`` of when this release was created.
28     image_count : Optional[int]
29         Number of images in this ``Release``.
30     class_count : Optional[int]
31         Number of distinct classes in this ``Release``.
32     available : bool
33         If this ``Release`` is downloadable or not.
34     latest : bool
35         If this ``Release`` is the latest one or not.
36     format : str
37         Format for the file of this ``Release`` should it be downloaded.
38 
39     Attributes
40     ----------
41     dataset_slug : str
42         The slug of the dataset.
43     team_slug : str
44         the slug of the team.
45     version : str
46         The version of the ``Release``.
47     name : str
48         The name of the ``Release``.
49     url : Optional[str]
50         The full url used to download the ``Release``.
51     export_date : datetime.datetime
52         The ``datetime`` of when this release was created.
53     image_count : Optional[int]
54         Number of images in this ``Release``.
55     class_count : Optional[int]
56         Number of distinct classes in this ``Release``.
57     available : bool
58         If this ``Release`` is downloadable or not.
59     latest : bool
60         If this ``Release`` is the latest one or not.
61     format : str
62         Format for the file of this ``Release`` should it be downloaded.
63     """
64 
65     def __init__(
66         self,
67         dataset_slug: str,
68         team_slug: str,
69         version: str,
70         name: str,
71         url: Optional[str],
72         export_date: datetime.datetime,
73         image_count: Optional[int],
74         class_count: Optional[int],
75         available: bool,
76         latest: bool,
77         format: str,
78     ):
79         self.dataset_slug = dataset_slug
80         self.team_slug = team_slug
81         self.version = version
82         self.name = name
83         self.url = url
84         self.export_date = export_date
85         self.image_count = image_count
86         self.class_count = class_count
87         self.available = available
88         self.latest = latest
89         self.format = format
90 
91     @classmethod
92     def parse_json(cls, dataset_slug: str, team_slug: str, payload: Dict[str, Any]) -> "Release":
93         """
94         Given a json, parses it into a ``Release`` object instance.
95 
96         Parameters
97         ----------
98         dataset_slug : str
99             The slug of the dataset this ``Release`` belongs to.
100         team_slug : str
101             The slug of the team this ``Release``'s dataset belongs to.
102         payload : Dict[str, Any]
103             A Dictionary with the ``Release`` information. It must have a minimal format similar to:
104 
105             .. code-block:: javascript
106                 {
107                     "version": "a_version",
108                     "name": "a_name"
109                 }
110 
111             If no ``format`` key is found in ``payload``, the default will be ``json``.
112 
113             Optional ``payload`` has no ``download_url`` key, then ``url``, ``available``,
114             ``image_count``, ``class_count`` and ``latest`` will default to either ``None`` or
115             ``False`` depending on the type.
116 
117             A more complete format for this parameter would be similar to:
118 
119             .. code-block:: javascript
120                 {
121                     "version": "a_version",
122                     "name": "a_name",
123                     "metadata": {
124                         "num_images": 1,
125                         "annotation_classes": []
126                     },
127                     "download_url": "http://www.some_url_here.com",
128                     "latest": false,
129                     "format": "a_format"
130                 }
131 
132         Returns
133         -------
134         Release
135             A ``Release`` created from the given payload.
136         """
137         try:
138             export_date: datetime.datetime = datetime.datetime.strptime(payload["inserted_at"], "%Y-%m-%dT%H:%M:%S%z")
139         except ValueError:
140             # For python version older than 3.7
141             export_date = datetime.datetime.strptime(payload["inserted_at"], "%Y-%m-%dT%H:%M:%SZ")
142 
143         if payload["download_url"] is None:
144             return cls(
145                 dataset_slug=dataset_slug,
146                 team_slug=team_slug,
147                 version=payload["version"],
148                 name=payload["name"],
149                 export_date=export_date,
150                 url=None,
151                 available=False,
152                 image_count=None,
153                 class_count=None,
154                 latest=False,
155                 format=payload.get("format", "json"),
156             )
157 
158         return cls(
159             dataset_slug=dataset_slug,
160             team_slug=team_slug,
161             version=payload["version"],
162             name=payload["name"],
163             image_count=payload["metadata"]["num_images"],
164             class_count=len(payload["metadata"]["annotation_classes"]),
165             export_date=export_date,
166             url=payload["download_url"],
167             available=True,
168             latest=payload["latest"],
169             format=payload.get("format", "json"),
170         )
171 
172     def download_zip(self, path: Path) -> Path:
173         """
174         Downloads the release content into a zip file located by the given path.
175 
176         Parameters
177         ----------
178         path : Path
179             The path where the zip file will be located.
180 
181         Returns
182         --------
183         Path
184             Same ``Path`` as provided in the parameters.
185 
186         Raises
187         ------
188         ValueError
189             If this ``Release`` object does not have a specified url.
190         """
191         if not self.url:
192             raise ValueError("Release must have a valid url to download the zip.")
193 
194         from darwin.client import Client
195 
196         config_path: Path = Path.home() / ".darwin" / "config.yaml"
197         client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)
198 
199         data: Response = client.fetch_binary(self.url)
200         with open(path, "wb") as download_file:
201             for chunk in data.iter_content(chunk_size=8192):
202                 download_file.write(chunk)
203 
204         return path
205 
206     @property
207     def identifier(self) -> DatasetIdentifier:
208         """DatasetIdentifier : The ``DatasetIdentifier`` for this ``Release``."""
209         return DatasetIdentifier(team_slug=self.team_slug, dataset_slug=self.dataset_slug, version=self.name)
210
```
--- 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/darwin/dataset/release.py b/darwin/dataset/release.py
--- a/darwin/dataset/release.py
+++ b/darwin/dataset/release.py
@@ -1,9 +1,10 @@
 import datetime
+import shutil
 from pathlib import Path
 from typing import Any, Dict, Optional
 
+import requests
 from darwin.dataset.identifier import DatasetIdentifier
-from requests import Response
 
 
 class Release:
@@ -191,15 +192,9 @@
         if not self.url:
             raise ValueError("Release must have a valid url to download the zip.")
 
-        from darwin.client import Client
-
-        config_path: Path = Path.home() / ".darwin" / "config.yaml"
-        client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)
-
-        data: Response = client.fetch_binary(self.url)
-        with open(path, "wb") as download_file:
-            for chunk in data.iter_content(chunk_size=8192):
-                download_file.write(chunk)
+        with requests.get(self.url, stream=True) as response:
+            with open(path, "wb") as download_file:
+                shutil.copyfileobj(response.raw, download_file)
 
         return path
 
diff --git a/darwin/version/__init__.py b/darwin/version/__init__.py
--- a/darwin/version/__init__.py
+++ b/darwin/version/__init__.py
@@ -1 +1 @@
-__version__ = "0.7.11"
+__version__ = "0.7.12"

{"golden_diff": "diff --git a/darwin/dataset/release.py b/darwin/dataset/release.py\n--- a/darwin/dataset/release.py\n+++ b/darwin/dataset/release.py\n@@ -1,9 +1,10 @@\n import datetime\n+import shutil\n from pathlib import Path\n from typing import Any, Dict, Optional\n \n+import requests\n from darwin.dataset.identifier import DatasetIdentifier\n-from requests import Response\n \n \n class Release:\n@@ -191,15 +192,9 @@\n         if not self.url:\n             raise ValueError(\"Release must have a valid url to download the zip.\")\n \n-        from darwin.client import Client\n-\n-        config_path: Path = Path.home() / \".darwin\" / \"config.yaml\"\n-        client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)\n-\n-        data: Response = client.fetch_binary(self.url)\n-        with open(path, \"wb\") as download_file:\n-            for chunk in data.iter_content(chunk_size=8192):\n-                download_file.write(chunk)\n+        with requests.get(self.url, stream=True) as response:\n+            with open(path, \"wb\") as download_file:\n+                shutil.copyfileobj(response.raw, download_file)\n \n         return path\n \ndiff --git a/darwin/version/__init__.py b/darwin/version/__init__.py\n--- a/darwin/version/__init__.py\n+++ b/darwin/version/__init__.py\n@@ -1 +1 @@\n-__version__ = \"0.7.11\"\n+__version__ = \"0.7.12\"\n", "issue": "darwin-py 0.7.11 causing `MissingConfig` issues\nWhen I try using 0.7.11, I am getting an error when I run `dataset.pull`\r\n\r\nIt appears to be something with the release.py `download_zip` code passing config.yaml.  I checked my .darwin folder and I don't see a config.yaml so I'm sure that's why it's causing an issue, but not sure where that is supposed to come from.  \r\n\r\nHere's a reproducible version you should be able to use\r\n```\r\nimport darwin; print(darwin.__version__)\r\nfrom darwin.client import Client\r\n\r\nAPI_KEY = *your_key_here*\r\nclient = Client.from_api_key(API_KEY)\r\n\r\ndatasets={d.name:d for d in client.list_remote_datasets()}\r\ndataset=datasets[\"kevin-tmp\"]\r\n\r\nrelease = dataset.get_release()\r\ndataset.pull(release=release)\r\n```\r\n\r\nstack trace in 0.7.11: \r\n```\r\n---------------------------------------------------------------------------\r\nMissingConfig                             Traceback (most recent call last)\r\n/tmp/ipykernel_277/279924910.py in <module>\r\n     10 \r\n     11 release = dataset.get_release()\r\n---> 12 dataset.pull(release=release)\r\n\r\n/opt/conda/lib/python3.7/site-packages/darwin/dataset/remote_dataset.py in pull(self, release, blocking, multi_threaded, only_annotations, force_replace, remove_extra, subset_filter_annotations_function, subset_folder_name, use_folders, video_frames)\r\n    309             tmp_dir = Path(tmp_dir_str)\r\n    310             # Download the release from Darwin\r\n--> 311             zip_file_path = release.download_zip(tmp_dir / \"dataset.zip\")\r\n    312             with zipfile.ZipFile(zip_file_path) as z:\r\n    313                 # Extract annotations\r\n\r\n/opt/conda/lib/python3.7/site-packages/darwin/dataset/release.py in download_zip(self, path)\r\n    195 \r\n    196         config_path: Path = Path.home() / \".darwin\" / \"config.yaml\"\r\n--> 197         client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)\r\n    198 \r\n    199         data: Response = client.fetch_binary(self.url)\r\n\r\n/opt/conda/lib/python3.7/site-packages/darwin/client.py in from_config(cls, config_path, team_slug)\r\n    836         \"\"\"\r\n    837         if not config_path.exists():\r\n--> 838             raise MissingConfig()\r\n    839         config = Config(config_path)\r\n    840 \r\n\r\nMissingConfig:\r\n```\n", "before_files": [{"content": "__version__ = \"0.7.11\"\n", "path": "darwin/version/__init__.py"}, {"content": "import datetime\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional\n\nfrom darwin.dataset.identifier import DatasetIdentifier\nfrom requests import Response\n\n\nclass Release:\n    \"\"\"\n    Represents a release/export. Releases created this way can only contain items with 'completed'\n    status.\n\n    Parameters\n    ----------\n    dataset_slug : str\n        The slug of the dataset.\n    team_slug : str\n        the slug of the team.\n    version : str\n        The version of the ``Release``.\n    name : str\n        The name of the ``Release``.\n    url : Optional[str]\n        The full url used to download the ``Release``.\n    export_date : datetime.datetime\n        The ``datetime`` of when this release was created.\n    image_count : Optional[int]\n        Number of images in this ``Release``.\n    class_count : Optional[int]\n        Number of distinct classes in this ``Release``.\n    available : bool\n        If this ``Release`` is downloadable or not.\n    latest : bool\n        If this ``Release`` is the latest one or not.\n    format : str\n        Format for the file of this ``Release`` should it be downloaded.\n\n    Attributes\n    ----------\n    dataset_slug : str\n        The slug of the dataset.\n    team_slug : str\n        the slug of the team.\n    version : str\n        The version of the ``Release``.\n    name : str\n        The name of the ``Release``.\n    url : Optional[str]\n        The full url used to download the ``Release``.\n    export_date : datetime.datetime\n        The ``datetime`` of when this release was created.\n    image_count : Optional[int]\n        Number of images in this ``Release``.\n    class_count : Optional[int]\n        Number of distinct classes in this ``Release``.\n    available : bool\n        If this ``Release`` is downloadable or not.\n    latest : bool\n        If this ``Release`` is the latest one or not.\n    format : str\n        Format for the file of this ``Release`` should it be downloaded.\n    \"\"\"\n\n    def __init__(\n        self,\n        dataset_slug: str,\n        team_slug: str,\n        version: str,\n        name: str,\n        url: Optional[str],\n        export_date: datetime.datetime,\n        image_count: Optional[int],\n        class_count: Optional[int],\n        available: bool,\n        latest: bool,\n        format: str,\n    ):\n        self.dataset_slug = dataset_slug\n        self.team_slug = team_slug\n        self.version = version\n        self.name = name\n        self.url = url\n        self.export_date = export_date\n        self.image_count = image_count\n        self.class_count = class_count\n        self.available = available\n        self.latest = latest\n        self.format = format\n\n    @classmethod\n    def parse_json(cls, dataset_slug: str, team_slug: str, payload: Dict[str, Any]) -> \"Release\":\n        \"\"\"\n        Given a json, parses it into a ``Release`` object instance.\n\n        Parameters\n        ----------\n        dataset_slug : str\n            The slug of the dataset this ``Release`` belongs to.\n        team_slug : str\n            The slug of the team this ``Release``'s dataset belongs to.\n        payload : Dict[str, Any]\n            A Dictionary with the ``Release`` information. It must have a minimal format similar to:\n\n            .. code-block:: javascript\n                {\n                    \"version\": \"a_version\",\n                    \"name\": \"a_name\"\n                }\n\n            If no ``format`` key is found in ``payload``, the default will be ``json``.\n\n            Optional ``payload`` has no ``download_url`` key, then ``url``, ``available``,\n            ``image_count``, ``class_count`` and ``latest`` will default to either ``None`` or\n            ``False`` depending on the type.\n\n            A more complete format for this parameter would be similar to:\n\n            .. code-block:: javascript\n                {\n                    \"version\": \"a_version\",\n                    \"name\": \"a_name\",\n                    \"metadata\": {\n                        \"num_images\": 1,\n                        \"annotation_classes\": []\n                    },\n                    \"download_url\": \"http://www.some_url_here.com\",\n                    \"latest\": false,\n                    \"format\": \"a_format\"\n                }\n\n        Returns\n        -------\n        Release\n            A ``Release`` created from the given payload.\n        \"\"\"\n        try:\n            export_date: datetime.datetime = datetime.datetime.strptime(payload[\"inserted_at\"], \"%Y-%m-%dT%H:%M:%S%z\")\n        except ValueError:\n            # For python version older than 3.7\n            export_date = datetime.datetime.strptime(payload[\"inserted_at\"], \"%Y-%m-%dT%H:%M:%SZ\")\n\n        if payload[\"download_url\"] is None:\n            return cls(\n                dataset_slug=dataset_slug,\n                team_slug=team_slug,\n                version=payload[\"version\"],\n                name=payload[\"name\"],\n                export_date=export_date,\n                url=None,\n                available=False,\n                image_count=None,\n                class_count=None,\n                latest=False,\n                format=payload.get(\"format\", \"json\"),\n            )\n\n        return cls(\n            dataset_slug=dataset_slug,\n            team_slug=team_slug,\n            version=payload[\"version\"],\n            name=payload[\"name\"],\n            image_count=payload[\"metadata\"][\"num_images\"],\n            class_count=len(payload[\"metadata\"][\"annotation_classes\"]),\n            export_date=export_date,\n            url=payload[\"download_url\"],\n            available=True,\n            latest=payload[\"latest\"],\n            format=payload.get(\"format\", \"json\"),\n        )\n\n    def download_zip(self, path: Path) -> Path:\n        \"\"\"\n        Downloads the release content into a zip file located by the given path.\n\n        Parameters\n        ----------\n        path : Path\n            The path where the zip file will be located.\n\n        Returns\n        --------\n        Path\n            Same ``Path`` as provided in the parameters.\n\n        Raises\n        ------\n        ValueError\n            If this ``Release`` object does not have a specified url.\n        \"\"\"\n        if not self.url:\n            raise ValueError(\"Release must have a valid url to download the zip.\")\n\n        from darwin.client import Client\n\n        config_path: Path = Path.home() / \".darwin\" / \"config.yaml\"\n        client: Client = Client.from_config(config_path=config_path, team_slug=self.team_slug)\n\n        data: Response = client.fetch_binary(self.url)\n        with open(path, \"wb\") as download_file:\n            for chunk in data.iter_content(chunk_size=8192):\n                download_file.write(chunk)\n\n        return path\n\n    @property\n    def identifier(self) -> DatasetIdentifier:\n        \"\"\"DatasetIdentifier : The ``DatasetIdentifier`` for this ``Release``.\"\"\"\n        return DatasetIdentifier(team_slug=self.team_slug, dataset_slug=self.dataset_slug, version=self.name)\n", "path": "darwin/dataset/release.py"}], "after_files": [{"content": "__version__ = \"0.7.12\"\n", "path": "darwin/version/__init__.py"}, {"content": "import datetime\nimport shutil\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional\n\nimport requests\nfrom darwin.dataset.identifier import DatasetIdentifier\n\n\nclass Release:\n    \"\"\"\n    Represents a release/export. Releases created this way can only contain items with 'completed'\n    status.\n\n    Parameters\n    ----------\n    dataset_slug : str\n        The slug of the dataset.\n    team_slug : str\n        the slug of the team.\n    version : str\n        The version of the ``Release``.\n    name : str\n        The name of the ``Release``.\n    url : Optional[str]\n        The full url used to download the ``Release``.\n    export_date : datetime.datetime\n        The ``datetime`` of when this release was created.\n    image_count : Optional[int]\n        Number of images in this ``Release``.\n    class_count : Optional[int]\n        Number of distinct classes in this ``Release``.\n    available : bool\n        If this ``Release`` is downloadable or not.\n    latest : bool\n        If this ``Release`` is the latest one or not.\n    format : str\n        Format for the file of this ``Release`` should it be downloaded.\n\n    Attributes\n    ----------\n    dataset_slug : str\n        The slug of the dataset.\n    team_slug : str\n        the slug of the team.\n    version : str\n        The version of the ``Release``.\n    name : str\n        The name of the ``Release``.\n    url : Optional[str]\n        The full url used to download the ``Release``.\n    export_date : datetime.datetime\n        The ``datetime`` of when this release was created.\n    image_count : Optional[int]\n        Number of images in this ``Release``.\n    class_count : Optional[int]\n        Number of distinct classes in this ``Release``.\n    available : bool\n        If this ``Release`` is downloadable or not.\n    latest : bool\n        If this ``Release`` is the latest one or not.\n    format : str\n        Format for the file of this ``Release`` should it be downloaded.\n    \"\"\"\n\n    def __init__(\n        self,\n        dataset_slug: str,\n        team_slug: str,\n        version: str,\n        name: str,\n        url: Optional[str],\n        export_date: datetime.datetime,\n        image_count: Optional[int],\n        class_count: Optional[int],\n        available: bool,\n        latest: bool,\n        format: str,\n    ):\n        self.dataset_slug = dataset_slug\n        self.team_slug = team_slug\n        self.version = version\n        self.name = name\n        self.url = url\n        self.export_date = export_date\n        self.image_count = image_count\n        self.class_count = class_count\n        self.available = available\n        self.latest = latest\n        self.format = format\n\n    @classmethod\n    def parse_json(cls, dataset_slug: str, team_slug: str, payload: Dict[str, Any]) -> \"Release\":\n        \"\"\"\n        Given a json, parses it into a ``Release`` object instance.\n\n        Parameters\n        ----------\n        dataset_slug : str\n            The slug of the dataset this ``Release`` belongs to.\n        team_slug : str\n            The slug of the team this ``Release``'s dataset belongs to.\n        payload : Dict[str, Any]\n            A Dictionary with the ``Release`` information. It must have a minimal format similar to:\n\n            .. code-block:: javascript\n                {\n                    \"version\": \"a_version\",\n                    \"name\": \"a_name\"\n                }\n\n            If no ``format`` key is found in ``payload``, the default will be ``json``.\n\n            Optional ``payload`` has no ``download_url`` key, then ``url``, ``available``,\n            ``image_count``, ``class_count`` and ``latest`` will default to either ``None`` or\n            ``False`` depending on the type.\n\n            A more complete format for this parameter would be similar to:\n\n            .. code-block:: javascript\n                {\n                    \"version\": \"a_version\",\n                    \"name\": \"a_name\",\n                    \"metadata\": {\n                        \"num_images\": 1,\n                        \"annotation_classes\": []\n                    },\n                    \"download_url\": \"http://www.some_url_here.com\",\n                    \"latest\": false,\n                    \"format\": \"a_format\"\n                }\n\n        Returns\n        -------\n        Release\n            A ``Release`` created from the given payload.\n        \"\"\"\n        try:\n            export_date: datetime.datetime = datetime.datetime.strptime(payload[\"inserted_at\"], \"%Y-%m-%dT%H:%M:%S%z\")\n        except ValueError:\n            # For python version older than 3.7\n            export_date = datetime.datetime.strptime(payload[\"inserted_at\"], \"%Y-%m-%dT%H:%M:%SZ\")\n\n        if payload[\"download_url\"] is None:\n            return cls(\n                dataset_slug=dataset_slug,\n                team_slug=team_slug,\n                version=payload[\"version\"],\n                name=payload[\"name\"],\n                export_date=export_date,\n                url=None,\n                available=False,\n                image_count=None,\n                class_count=None,\n                latest=False,\n                format=payload.get(\"format\", \"json\"),\n            )\n\n        return cls(\n            dataset_slug=dataset_slug,\n            team_slug=team_slug,\n            version=payload[\"version\"],\n            name=payload[\"name\"],\n            image_count=payload[\"metadata\"][\"num_images\"],\n            class_count=len(payload[\"metadata\"][\"annotation_classes\"]),\n            export_date=export_date,\n            url=payload[\"download_url\"],\n            available=True,\n            latest=payload[\"latest\"],\n            format=payload.get(\"format\", \"json\"),\n        )\n\n    def download_zip(self, path: Path) -> Path:\n        \"\"\"\n        Downloads the release content into a zip file located by the given path.\n\n        Parameters\n        ----------\n        path : Path\n            The path where the zip file will be located.\n\n        Returns\n        --------\n        Path\n            Same ``Path`` as provided in the parameters.\n\n        Raises\n        ------\n        ValueError\n            If this ``Release`` object does not have a specified url.\n        \"\"\"\n        if not self.url:\n            raise ValueError(\"Release must have a valid url to download the zip.\")\n\n        with requests.get(self.url, stream=True) as response:\n            with open(path, \"wb\") as download_file:\n                shutil.copyfileobj(response.raw, download_file)\n\n        return path\n\n    @property\n    def identifier(self) -> DatasetIdentifier:\n        \"\"\"DatasetIdentifier : The ``DatasetIdentifier`` for this ``Release``.\"\"\"\n        return DatasetIdentifier(team_slug=self.team_slug, dataset_slug=self.dataset_slug, version=self.name)\n", "path": "darwin/dataset/release.py"}]}