code: def test_nonzero(self):
      # Tests regression #21172.
      sa = SparseArray(
          [float("nan"), float("nan"), 1, 0, 0, 2, 0, 0, 0, 3, 0, 0]
      )
      expected = np.array([2, 5, 9], dtype=np.int32)
      (result,) = sa.nonzero()
      tm.assert_numpy_array_equal(expected, result)
  
      sa = SparseArray([0, 0, 1, 0, 0, 2, 0, 0, 0, 3, 0, 0])
      (result,) = sa.nonzero()
      tm.assert_numpy_array_equal(expected, result)
  
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 13 for calling the TestSparseArray obj's underlying member method code with example usage: obj.test_nonzero() without return types