class_docstr: DataFrame accessor for sparse data.
  
  Examples
  --------
  >>> df = pd.DataFrame({"a": [1, 2, 0, 0],
  ...                   "b": [3, 0, 0, 4]}, dtype="Sparse[int]")
  >>> df.sparse.density
  0.5
class_docstr_tok: ["DataFrame","accessor","for","sparse","data",".","Examples","--","--","--","--",">",">",">","df","=","pd.DataFrame","(","{","``","a","''",":","[","1",",","2",",","0",",","0","]",",","...","``","b","''",":","[","3",",","0",",","0",",","4","]","}",",","dtype=","''","Sparse","[","int","]","''",")",">",">",">","df.sparse.density","0.5"]
code: def _validate(self, data) -> None:
      dtypes = data.dtypes
      if not all(isinstance(t, SparseDtype) for t in dtypes):
          raise AttributeError(self._validation_msg)
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  import numpy
  from pandas.compat._optional import import_optional_dependency
  from pandas.core.dtypes.cast import find_common_type
  from pandas.core.dtypes.dtypes import SparseDtype
  from pandas.core.accessor import PandasDelegate, delegate_names
  from pandas.core.arrays.sparse.array import SparseArray
label_desc: Use image node_id 1 for calling the SparseFrameAccessor obj's underlying member method code with example usage: obj._validate(data) without return types