code: def test_setting_fill_value_updates():
      arr = SparseArray([0.0, np.nan], fill_value=0)
      arr.fill_value = np.nan
      # use private constructor to get the index right
      # otherwise both nans would be un-stored.
      expected = SparseArray._simple_new(
          sparse_array=np.array([np.nan]),
          sparse_index=IntIndex(2, [1]),
          dtype=SparseDtype(float, np.nan),
      )
      tm.assert_sp_array_equal(arr, expected)
  
imports: import re
  import numpy
  import pytest
  from pandas._libs.sparse import IntIndex
  import pandas
  from pandas import SparseDtype, isna
  import pandas._testing
  from pandas.core.arrays.sparse import SparseArray
label_desc: Use image node_id 5 for calling a global function with example usage: test_setting_fill_value_updates() without return types