code: def test_pct_change_with_nas(
      self, periods, fill_method, limit, exp, frame_or_series
  ):
      vals = [np.nan, np.nan, 1, 2, 4, 10, np.nan, np.nan]
      obj = frame_or_series(vals)
  
      msg = (
          "The 'fill_method' keyword being not None and the 'limit' keyword in "
          f"{type(obj).__name__}.pct_change are deprecated"
      )
      with tm.assert_produces_warning(FutureWarning, match=msg):
          res = obj.pct_change(
              periods=periods, fill_method=fill_method, limit=limit
          )
      tm.assert_equal(res, frame_or_series(exp))
  
file_path: pandas/pandas/tests/frame/methods/test_pct_change.py
imports: import numpy
  import pytest
  from pandas import DataFrame, Series
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestDataFramePctChange obj's underlying member method code with example usage: obj.test_pct_change_with_nas(periods, fill_method, limit, exp, frame_or_series) without return types