code: def test_invert_operator(self):
      arr = SparseArray(
          [False, True, False, True], fill_value=False, dtype=np.bool_
      )
      exp = SparseArray(
          np.invert([False, True, False, True]),
          fill_value=True,
          dtype=np.bool_,
      )
      res = ~arr
      tm.assert_sp_array_equal(exp, res)
  
      arr = SparseArray(
          [0, 1, 0, 2, 3, 0], fill_value=0, dtype=np.int32
      )
      res = ~arr
      exp = SparseArray(
          [-1, -2, -1, -3, -4, -1], fill_value=-1, dtype=np.int32
      )
      tm.assert_sp_array_equal(exp, res)
  
file_path: pandas/pandas/tests/arrays/sparse/test_unary.py
imports: import operator
  import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.core.arrays import SparseArray
label_desc: Use image node_id 3 for calling the TestUnaryMethods obj's underlying member method code with example usage: obj.test_invert_operator() without return types