class_docstr: handle_nans.
class_docstr_tok: ["handle_nans","."]
code: def test_handle_nans_index(self):
      s = pd.Series(["Test", np.nan, pd.NA], index=[4, 5, 6])
  
      @_helper.handle_nans(replace_nans_with="This was a NAN")
      def f(s):
          return s
  
      s_true = pd.Series(
          ["Test", "This was a NAN", "This was a NAN"], index=[4, 5, 6]
      )
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          self.assertTrue(f(s).index.equals(s_true.index))
  
file_path: texthero/tests/test_helpers.py
imports: import pandas
  import numpy
  from .None import PandasTestCase
  import doctest
  import unittest
  import warnings
  from texthero import _helper
label_desc: Use image node_id 3 for calling the TestHelpers obj's underlying member method code with example usage: obj.test_handle_nans_index() and returns: s