code: def test_to_numeric_dtype_backend_downcasting(val, dtype, downcast):
      # GH#50505
      if "pyarrow" in dtype:
          pytest.importorskip("pyarrow")
          dtype_backend = "pyarrow"
      else:
          dtype_backend = "numpy_nullable"
      ser = Series([val, None], dtype=object)
      result = to_numeric(
          ser, dtype_backend=dtype_backend, downcast=downcast
      )
      expected = Series([val, pd.NA], dtype=dtype)
      tm.assert_series_equal(result, expected)
  
imports: import decimal
  import numpy
  from numpy import iinfo
  import pytest
  import pandas.util._test_decorators
  import pandas
  from pandas import ArrowDtype, DataFrame, Index, Series, option_context, to_numeric
  import pandas._testing
label_desc: Use image node_id 56 for calling a global function with example usage: test_to_numeric_dtype_backend_downcasting(val, dtype, downcast) without return types