class_docstr: Attribute type for Scipy sparse arrays. Can accept values of any type in
  ``scipy.sparse``. Arrays are serialized using the CSR format.
code: def value_to_hdf5(
      self, bind_parent: HDF5Group, key: str, value: SparseT
  ) -> HDF5Group:
      if not isinstance(value, csr_array):
          csr_value = csr_array(value)
      else:
          csr_value = value
  
      bind = bind_parent.create_group(key)
  
      bind["data"] = csr_value.data
      bind["indices"] = csr_value.indices
      bind["indptr"] = csr_value.indptr
      bind["shape"] = csr_value.shape
  
      return bind
  
file_path: pennylane/pennylane/data/attributes/sparse_array.py
imports: from functools import lru_cache
  from typing import Dict, Generic, Tuple, Type, TypeVar, Union, cast
  import numpy
  from scipy.sparse import bsr_array, bsr_matrix, coo_array, coo_matrix, csc_array, csc_matrix, csr_array, csr_matrix, dia_array, dia_matrix, dok_array, dok_matrix, lil_array, lil_matrix
  from pennylane.data.base.attribute import AttributeInfo, DatasetAttribute
  from pennylane.data.base.hdf5 import HDF5Group
label_desc: Use image node_id 6 for calling the DatasetSparseArray obj's underlying member method code with example usage: obj.value_to_hdf5(bind_parent, key, value) and returns: bind