code: def test_series_replace_all(gsr, to_replace, value):
      psr = gsr.to_pandas()
  
      gd_to_replace = to_replace
      if isinstance(to_replace, cudf.Series):
          pd_to_replace = to_replace.to_pandas()
      else:
          pd_to_replace = to_replace
  
      gd_value = value
      if isinstance(value, cudf.Series):
          pd_value = value.to_pandas()
      else:
          pd_value = value
  
      actual = gsr.replace(to_replace=gd_to_replace, value=gd_value)
      if pd_value is None:
          # TODO: Remove this workaround once cudf
          # introduces `no_default` values
          expected = psr.replace(to_replace=pd_to_replace)
      else:
          expected = psr.replace(
              to_replace=pd_to_replace, value=pd_value
          )
  
      assert_eq(
          expected.sort_values().reset_index(drop=True),
          actual.sort_values().reset_index(drop=True),
      )
  
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 1 for calling a global function with example usage: test_series_replace_all(gsr, to_replace, value) without return types