code: def test_series_multiple_times_with_nulls():
      sr = cudf.Series([1, 2, 3, None])
      expected = cudf.Series([None, None, None, None], dtype=np.int64)
  
      for i in range(3):
          got = sr.replace([1, 2, 3], None)
          assert_eq(expected, got)
          # BUG: #2695
          # The following series will acquire a chunk of memory and update with
          # values, but these values may still linger even after the memory
          # gets released. This memory space might get used for replace in
          # subsequent calls and the memory used for mask may have junk values.
          # So, if it is not updated properly, the result would be wrong.
          # So, this will help verify that scenario.
          cudf.Series([1, 1, 1, None])
  
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 20 for calling a global function with example usage: test_series_multiple_times_with_nulls() without return types