code: def test_series_set_equal_length_object_by_mask(replace_data):
      psr = pd.Series([1, 2, 3, 4, 5], dtype="Int64")
      gsr = cudf.from_pandas(psr)
  
      # Lengths match in trivial case
      pd_bool_col = pd.Series([True] * len(psr), dtype="boolean")
      gd_bool_col = cudf.from_pandas(pd_bool_col)
      psr[pd_bool_col] = (
          replace_data.to_pandas(nullable=True)
          if hasattr(replace_data, "to_pandas")
          else pd.Series(replace_data)
      )
      gsr[gd_bool_col] = replace_data
  
      assert_eq(psr.astype("float"), gsr.astype("float"))
  
      # Test partial masking
      psr[psr > 1] = (
          replace_data.to_pandas()
          if hasattr(replace_data, "to_pandas")
          else pd.Series(replace_data)
      )
      gsr[gsr > 1] = replace_data
  
      assert_eq(psr.astype("float"), gsr.astype("float"))
  
imports: import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_series_set_equal_length_object_by_mask(replace_data) without return types