code: def test_downcast_conversion_nan(float_numpy_dtype):
      dtype = float_numpy_dtype
      data = [1.0, 2.0, np.nan]
  
      expected = np.array(data, dtype=dtype)
      arr = np.array(data, dtype=dtype)
  
      result = maybe_downcast_to_dtype(arr, "infer")
      tm.assert_almost_equal(result, expected)
  
file_path: pandas/pandas/tests/dtypes/cast/test_downcast.py
imports: import decimal
  import numpy
  import pytest
  from pandas.core.dtypes.cast import maybe_downcast_to_dtype
  from pandas import Series, Timedelta
  import pandas._testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_downcast_conversion_nan(float_numpy_dtype) without return types