code: def test_where_unsafe_upcast(dtype, expected_dtype):
      # see gh-9743
      s = Series(np.arange(10), dtype=dtype)
      values = [2.5, 3.5, 4.5, 5.5, 6.5]
      mask = s < 5
      expected = Series(
          values + list(range(5, 10)), dtype=expected_dtype
      )
      warn = (
          None
          if np.dtype(dtype).kind
          == np.dtype(expected_dtype).kind
          == "f"
          else FutureWarning
      )
      with tm.assert_produces_warning(warn, match="incompatible dtype"):
          s[mask] = values
      tm.assert_series_equal(s, expected)
  
imports: import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  from pandas.core.dtypes.common import is_integer
  import pandas
  from pandas import Series, Timestamp, date_range, isna
  import pandas._testing
label_desc: Use image node_id 3 for calling a global function with example usage: test_where_unsafe_upcast(dtype, expected_dtype) without return types