code: def test_apply_convert_dtype_deprecated(convert_dtype):
      ser = Series(np.random.default_rng(2).standard_normal(10))
  
      def func(x):
          return x if x > 0 else np.nan
  
      with tm.assert_produces_warning(FutureWarning):
          ser.apply(func, convert_dtype=convert_dtype, by_row="compat")
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series, concat, date_range, timedelta_range
  import pandas._testing
  from pandas.tests.apply.common import series_transform_kernels
label_desc: Use image node_id 5 for calling a global function with example usage: test_apply_convert_dtype_deprecated(convert_dtype) and returns: unknown