code: def test_series_to_numeric_preserve_index_name(klass):
      ser = klass(["1"] * 8, index=range(2, 10), name="name")
      result = cudf.to_numeric(ser)
      expected = cudf.Series([1] * 8, index=range(2, 10), name="name")
      assert_eq(result, expected)
  
imports: import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import NUMERIC_TYPES, assert_eq
  from cudf.utils.dtypes import np_dtypes_to_pandas_dtypes
label_desc: Use image node_id 17 for calling a global function with example usage: test_series_to_numeric_preserve_index_name(klass) without return types