prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Convenience for wkcuber.api
  To open/create a dataset with the cool new high-level API the following code is required:
  
  ```python
  from wkcuber.api.Dataset import WKDataset
  from pathlib import Path
  
  ds1 = WKDataset.create(Path("path") / "to" / "dataset1", scale=(128,128,128))
  ds2 = WKDataset.open(Path("path") / "to" / "dataset2")
  
  ```
  
  For one-off scripts, I think that could be a bit more convenient, if we had an API like this
  
  ```python
  from wkcuber import WKDataset
  
  ds1 = WKDataset.create("path/to/dataset1", scale=(128, 128, 128))
  ds2 = WKDataset.open("path/to/dataset2")
  ```
  
  Any thoughts? @rschwanhold @jstriebel @philippotto 
  
  
  </issue>
  <code>
  [start of wkcuber/__init__.py]
  1 from .cubing import cubing
  2 from .downsampling import downsample_mags
  3 from .compress import compress_mag
  4 from .metadata import write_webknossos_metadata
  5
  [end of wkcuber/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/wkcuber/__init__.py b/wkcuber/__init__.py
  --- a/wkcuber/__init__.py
  +++ b/wkcuber/__init__.py
  @@ -1,4 +1,6 @@
  +from .api.Dataset import WKDataset
   from .cubing import cubing
   from .downsampling import downsample_mags
   from .compress import compress_mag
  +from .mag import Mag
   from .metadata import write_webknossos_metadata
  
verification_info: {"golden_diff": "diff --git a/wkcuber/__init__.py b/wkcuber/__init__.py\n--- a/wkcuber/__init__.py\n+++ b/wkcuber/__init__.py\n@@ -1,4 +1,6 @@\n+from .api.Dataset import WKDataset\n from .cubing import cubing\n from .downsampling import downsample_mags\n from .compress import compress_mag\n+from .mag import Mag\n from .metadata import write_webknossos_metadata\n", "issue": "Convenience for wkcuber.api\nTo open/create a dataset with the cool new high-level API the following code is required:\r\n\r\n```python\r\nfrom wkcuber.api.Dataset import WKDataset\r\nfrom pathlib import Path\r\n\r\nds1 = WKDataset.create(Path(\"path\") / \"to\" / \"dataset1\", scale=(128,128,128))\r\nds2 = WKDataset.open(Path(\"path\") / \"to\" / \"dataset2\")\r\n\r\n```\r\n\r\nFor one-off scripts, I think that could be a bit more convenient, if we had an API like this\r\n\r\n```python\r\nfrom wkcuber import WKDataset\r\n\r\nds1 = WKDataset.create(\"path/to/dataset1\", scale=(128, 128, 128))\r\nds2 = WKDataset.open(\"path/to/dataset2\")\r\n```\r\n\r\nAny thoughts? @rschwanhold @jstriebel @philippotto \r\n\n", "before_files": [{"content": "from .cubing import cubing\nfrom .downsampling import downsample_mags\nfrom .compress import compress_mag\nfrom .metadata import write_webknossos_metadata\n", "path": "wkcuber/__init__.py"}]}