code: def test_to_coo_nonzero_fill_val_raises(self, fill_value):
      pytest.importorskip("scipy")
      df = pd.DataFrame(
          {
              "A": SparseArray(
                  [fill_value, fill_value, fill_value, 2],
                  fill_value=fill_value,
              ),
              "B": SparseArray(
                  [fill_value, 2, fill_value, fill_value],
                  fill_value=fill_value,
              ),
          }
      )
      with pytest.raises(ValueError, match="fill value must be 0"):
          df.sparse.to_coo()
  
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 6 for calling the TestFrameAccessor obj's underlying member method code with example usage: obj.test_to_coo_nonzero_fill_val_raises(fill_value) without return types