code: def test_mask_return_dtype():
      # GH#50488
      ser = Series([0.0, 1.0, 2.0, 3.0], dtype=Float64Dtype())
      cond = ~ser.isna()
      other = Series([True, False, True, False])
      excepted = Series([1.0, 0.0, 1.0, 0.0], dtype=ser.dtype)
      result = ser.mask(cond, other)
      tm.assert_series_equal(result, excepted)
  
file_path: pandas/pandas/tests/frame/indexing/test_mask.py
imports: import numpy
  from pandas import NA, DataFrame, Float64Dtype, Series, StringDtype, Timedelta, isna
  import pandas._testing
label_desc: Use image node_id 3 for calling a global function with example usage: test_mask_return_dtype() without return types