prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Group is not defined in collection
  https://github.com/wright-group/WrightTools/blob/ca056aa600f341501a99d2ea4d11f7d74047bc26/WrightTools/_open.py#L48
  
  Statement will cause an attribute error. Not tested currently
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `WrightTools/_open.py`
  Content:
  ```
  1 """Generic open method for wt5 files."""
  2 
  3 
  4 # --- import -------------------------------------------------------------------------------------
  5 
  6 
  7 import posixpath
  8 
  9 import h5py
  10 
  11 from . import collection as wt_collection
  12 from . import data as wt_data
  13 
  14 
  15 # --- define -------------------------------------------------------------------------------------
  16 
  17 
  18 __all__ = ["open"]
  19 
  20 
  21 # --- functions ----------------------------------------------------------------------------------
  22 
  23 
  24 def open(filepath, edit_local=False):
  25     """Open any wt5 file, returning the top-level object (data or collection).
  26 
  27     Parameters
  28     ----------
  29     filepath : string
  30         Path to file.
  31     edit_local : boolean (optional)
  32         If True, the file itself will be opened for editing. Otherwise, a
  33         copy will be created. Default is False.
  34 
  35     Returns
  36     -------
  37     WrightTools Collection or Data
  38         Root-level object in file.
  39     """
  40     f = h5py.File(filepath)
  41     class_name = f[posixpath.sep].attrs["class"]
  42     name = f[posixpath.sep].attrs["name"]
  43     if class_name == "Data":
  44         return wt_data.Data(filepath=filepath, name=name, edit_local=edit_local)
  45     elif class_name == "Collection":
  46         return wt_collection.Collection(filepath=filepath, name=name, edit_local=edit_local)
  47     else:
  48         return wt_collection.Group(filepath=filepath, name=name, edit_local=edit_local)
  49
  ```
  --- 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/WrightTools/_open.py b/WrightTools/_open.py
  --- a/WrightTools/_open.py
  +++ b/WrightTools/_open.py
  @@ -10,6 +10,7 @@
   
   from . import collection as wt_collection
   from . import data as wt_data
  +from . import _group as wt_group
   
   
   # --- define -------------------------------------------------------------------------------------
  @@ -45,4 +46,4 @@
       elif class_name == "Collection":
           return wt_collection.Collection(filepath=filepath, name=name, edit_local=edit_local)
       else:
  -        return wt_collection.Group(filepath=filepath, name=name, edit_local=edit_local)
  +        return wt_group.Group(filepath=filepath, name=name, edit_local=edit_local)
  
verification_info: {"golden_diff": "diff --git a/WrightTools/_open.py b/WrightTools/_open.py\n--- a/WrightTools/_open.py\n+++ b/WrightTools/_open.py\n@@ -10,6 +10,7 @@\n \n from . import collection as wt_collection\n from . import data as wt_data\n+from . import _group as wt_group\n \n \n # --- define -------------------------------------------------------------------------------------\n@@ -45,4 +46,4 @@\n     elif class_name == \"Collection\":\n         return wt_collection.Collection(filepath=filepath, name=name, edit_local=edit_local)\n     else:\n-        return wt_collection.Group(filepath=filepath, name=name, edit_local=edit_local)\n+        return wt_group.Group(filepath=filepath, name=name, edit_local=edit_local)\n", "issue": "Group is not defined in collection\nhttps://github.com/wright-group/WrightTools/blob/ca056aa600f341501a99d2ea4d11f7d74047bc26/WrightTools/_open.py#L48\r\n\r\nStatement will cause an attribute error. Not tested currently\n", "before_files": [{"content": "\"\"\"Generic open method for wt5 files.\"\"\"\n\n\n# --- import -------------------------------------------------------------------------------------\n\n\nimport posixpath\n\nimport h5py\n\nfrom . import collection as wt_collection\nfrom . import data as wt_data\n\n\n# --- define -------------------------------------------------------------------------------------\n\n\n__all__ = [\"open\"]\n\n\n# --- functions ----------------------------------------------------------------------------------\n\n\ndef open(filepath, edit_local=False):\n    \"\"\"Open any wt5 file, returning the top-level object (data or collection).\n\n    Parameters\n    ----------\n    filepath : string\n        Path to file.\n    edit_local : boolean (optional)\n        If True, the file itself will be opened for editing. Otherwise, a\n        copy will be created. Default is False.\n\n    Returns\n    -------\n    WrightTools Collection or Data\n        Root-level object in file.\n    \"\"\"\n    f = h5py.File(filepath)\n    class_name = f[posixpath.sep].attrs[\"class\"]\n    name = f[posixpath.sep].attrs[\"name\"]\n    if class_name == \"Data\":\n        return wt_data.Data(filepath=filepath, name=name, edit_local=edit_local)\n    elif class_name == \"Collection\":\n        return wt_collection.Collection(filepath=filepath, name=name, edit_local=edit_local)\n    else:\n        return wt_collection.Group(filepath=filepath, name=name, edit_local=edit_local)\n", "path": "WrightTools/_open.py"}], "after_files": [{"content": "\"\"\"Generic open method for wt5 files.\"\"\"\n\n\n# --- import -------------------------------------------------------------------------------------\n\n\nimport posixpath\n\nimport h5py\n\nfrom . import collection as wt_collection\nfrom . import data as wt_data\nfrom . import _group as wt_group\n\n\n# --- define -------------------------------------------------------------------------------------\n\n\n__all__ = [\"open\"]\n\n\n# --- functions ----------------------------------------------------------------------------------\n\n\ndef open(filepath, edit_local=False):\n    \"\"\"Open any wt5 file, returning the top-level object (data or collection).\n\n    Parameters\n    ----------\n    filepath : string\n        Path to file.\n    edit_local : boolean (optional)\n        If True, the file itself will be opened for editing. Otherwise, a\n        copy will be created. Default is False.\n\n    Returns\n    -------\n    WrightTools Collection or Data\n        Root-level object in file.\n    \"\"\"\n    f = h5py.File(filepath)\n    class_name = f[posixpath.sep].attrs[\"class\"]\n    name = f[posixpath.sep].attrs[\"name\"]\n    if class_name == \"Data\":\n        return wt_data.Data(filepath=filepath, name=name, edit_local=edit_local)\n    elif class_name == \"Collection\":\n        return wt_collection.Collection(filepath=filepath, name=name, edit_local=edit_local)\n    else:\n        return wt_group.Group(filepath=filepath, name=name, edit_local=edit_local)\n", "path": "WrightTools/_open.py"}]}