code: def test_series_where(data_dtype, fill_value):
      psr = pd.Series(list(range(10)), dtype=data_dtype)
      sr = cudf.from_pandas(psr)
  
      if sr.dtype.type(fill_value) != fill_value:
          with pytest.raises(TypeError):
              sr.where(sr > 0, fill_value)
      else:
          # Cast back to original dtype as pandas automatically upcasts
          expect = psr.where(psr > 0, fill_value)
          got = sr.where(sr > 0, fill_value)
          # pandas returns 'float16' dtype, which is not supported in cudf
          assert_eq(
              expect,
              got,
              check_dtype=expect.dtype.kind not in ("f"),
          )
  
      if sr.dtype.type(fill_value) != fill_value:
          with pytest.raises(TypeError):
              sr.where(sr < 0, fill_value)
      else:
          expect = psr.where(psr < 0, fill_value)
          got = sr.where(sr < 0, fill_value)
          # pandas returns 'float16' dtype, which is not supported in cudf
          assert_eq(
              expect,
              got,
              check_dtype=expect.dtype.kind not in ("f"),
          )
  
      if sr.dtype.type(fill_value) != fill_value:
          with pytest.raises(TypeError):
              sr.where(sr == 0, fill_value)
      else:
          expect = psr.where(psr == 0, fill_value)
          got = sr.where(sr == 0, fill_value)
          # pandas returns 'float16' dtype, which is not supported in cudf
          assert_eq(
              expect,
              got,
              check_dtype=expect.dtype.kind not in ("f"),
          )
  
imports: import re
  from decimal import Decimal
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_134, PANDAS_GE_150
  from cudf.core.dtypes import Decimal32Dtype, Decimal64Dtype, Decimal128Dtype
  from cudf.testing._utils import INTEGER_TYPES, NUMERIC_TYPES, assert_eq, assert_exceptions_equal
label_desc: Use image node_id 15 for calling a global function with example usage: test_series_where(data_dtype, fill_value) without return types