code: def open_group(
      path: Union[Path, str], mode: Literal["r", "w", "w-", "a"] = "r"
  ) -> HDF5Group:
      """Creates or opens an HDF5 file at ``path`` and returns the root HDF5 group.
  
      Args:
          path: File system path for HDF5 File
          mode:  File handling mode. Possible values are "w-" (create, fail if file
              exists), "w" (create, overwrite existing), "a" (append existing,
              create if doesn't exist), "r" (read existing, must exist). Default is "r".
      """
      return h5py.File(path, mode)
  
file_path: pennylane/pennylane/data/base/hdf5.py
imports: from collections.abc import MutableMapping
  from pathlib import Path
  from typing import Literal, TypeVar, Union
  from uuid import uuid4
  from numpy.typing import ArrayLike
  from ._lazy_modules import fsspec, h5py
label_desc: Use image node_id 1 for calling a global function with example usage: open_group(path, mode) and returns: h5py