def METHOD_NAME(cls, h5py_data: str | Path | h5py.Group) -> _QCBase:
    """Constructs a schema object from an HDF5 object.
    While the QCSchema is officially tailored to support JSON, HDF5 is supported as a more
    high-performance alternative and considered the standard within Qiskit Nature. Due to its
    similarities with JSON a 1-to-1 correspondence can be made between the two.
    For more details refer to
    [here](https://molssi-qc-schema.readthedocs.io/en/latest/tech_discussion.html#json-and-hdf5).
    Args:
        h5py_data: can be either the path to a file or an `h5py.Group`.
    Returns:
        An instance of the schema object.
    """
    if isinstance(h5py_data, h5py.Group):
        return cls._from_hdf5_group(h5py_data)
    with h5py.File(h5py_data, "r") as file:
        return cls._from_hdf5_group(file)