code: def test_non_sparse_raises(self):
      ser = pd.Series([1, 2, 3])
      with pytest.raises(AttributeError, match=".sparse"):
          ser.sparse.density
  
imports: import string
  import numpy
  import pytest
  import pandas
  from pandas import SparseDtype
  import pandas._testing
  from pandas.core.arrays.sparse import SparseArray
label_desc: Use image node_id 5 for calling the TestSeriesAccessor obj's underlying member method code with example usage: obj.test_non_sparse_raises() without return types