code: def test_fillna_downcast(self):
      # GH#15277
      # infer int64 from float64
      df = DataFrame({"a": [1.0, np.nan]})
      msg = "The 'downcast' keyword in fillna is deprecated"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          result = df.fillna(0, downcast="infer")
      expected = DataFrame({"a": [1, 0]})
      tm.assert_frame_equal(result, expected)
  
      # infer int64 from float64 when fillna value is a dict
      df = DataFrame({"a": [1.0, np.nan]})
      with tm.assert_produces_warning(FutureWarning, match=msg):
          result = df.fillna({"a": 0}, downcast="infer")
      expected = DataFrame({"a": [1, 0]})
      tm.assert_frame_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  from pandas import Categorical, DataFrame, DatetimeIndex, NaT, PeriodIndex, Series, TimedeltaIndex, Timestamp, date_range, to_datetime
  import pandas._testing
  from pandas.tests.frame.common import _check_mixed_float
label_desc: Use image node_id 14 for calling the TestFillNA obj's underlying member method code with example usage: obj.test_fillna_downcast() without return types