class_docstr: Base class for Datasets.
docstr: Write dataset to HDF5 file at filepath.
  
  Args:
      dest: HDF5 file, or path to HDF5 file containing dataset, to write
          attributes to
      mode: File handling mode, if ``source`` is a file system path. Possible
          values are "w-" (create, fail if file exists), "w" (create, overwrite existing),
          and "a" (append existing, create if doesn't exist). Default is "w-".
      attributes: Optional list of attributes to copy. If None, all attributes
          will be copied. Note that identifiers will always be copied.
      overwrite: Whether to overwrite attributes that already exist in this
          dataset.
docstr_tok: ["Write","dataset","to","HDF5","file","at","filepath",".","Args",":","dest",":","HDF5","file",",","or","path","to","HDF5","file","containing","dataset",",","to","write","attributes","to","mode",":","File","handling","mode",",","if","``","source","``","is","a","file","system","path",".","Possible","values","are","``","w-","''","(","create",",","fail","if","file","exists",")",",","``","w","''","(","create",",","overwrite","existing",")",",","and","``","a","''","(","append","existing",",","create","if","does","n't","exist",")",".","Default","is","``","w-","''",".","attributes",":","Optional","list","of","attributes","to","copy",".","If","None",",","all","attributes","will","be","copied",".","Note","that","identifiers","will","always","be","copied",".","overwrite",":","Whether","to","overwrite","attributes","that","already","exist","in","this","dataset","."]
code: def write(
      self,
      dest: Union[str, Path, "Dataset"],
      mode: Literal["w", "w-", "a"] = "a",
      attributes: Optional[typing.Iterable[str]] = None,
      *,
      overwrite: bool = False,
  ) -> None:
      """Write dataset to HDF5 file at filepath.
  
      Args:
          dest: HDF5 file, or path to HDF5 file containing dataset, to write
              attributes to
          mode: File handling mode, if ``source`` is a file system path. Possible
              values are "w-" (create, fail if file exists), "w" (create, overwrite existing),
              and "a" (append existing, create if doesn't exist). Default is "w-".
          attributes: Optional list of attributes to copy. If None, all attributes
              will be copied. Note that identifiers will always be copied.
          overwrite: Whether to overwrite attributes that already exist in this
              dataset.
      """
      attributes = attributes if attributes is not None else ()
      on_conflict = "overwrite" if overwrite else "ignore"
  
      if not isinstance(dest, Dataset):
          dest = Path(dest).expanduser()
          dest = Dataset.open(dest, mode=mode)
          dest.info.update(self.info)
  
      hdf5.copy_all(
          self.bind, dest.bind, *attributes, on_conflict=on_conflict
      )
  
      missing_identifiers = [
          identifier
          for identifier in self.identifiers
          if not hasattr(dest, identifier)
      ]
      if missing_identifiers:
          hdf5.copy_all(self.bind, dest.bind, *missing_identifiers)
  
imports: import typing
  from dataclasses import dataclass
  from pathlib import Path
  from types import MappingProxyType
  from typing import Any, ClassVar, Generic, List, Literal, Optional, Tuple, Type, TypeVar, Union, cast, get_origin
  from typing_extensions import dataclass_transform
  from pennylane.data.base import hdf5
  from pennylane.data.base.attribute import AttributeInfo, DatasetAttribute
  from pennylane.data.base.hdf5 import HDF5Any, HDF5Group, h5py
  from pennylane.data.base.mapper import MapperMixin, match_obj_type
  from pennylane.data.base.typing_util import UNSET, T
label_desc: Use image node_id 12 for calling the Dataset obj's underlying member method code with example usage: obj.write(dest, mode, attributes) without return types