code: def test_setitem_dataframe_series_inplace(df):
      pdf = df.copy(deep=True)
      gdf = cudf.from_pandas(pdf)
  
      pdf["a"].replace(1, 500, inplace=True)
      gdf["a"].replace(1, 500, inplace=True)
  
      assert_eq(pdf, gdf)
  
      psr_a = pdf["a"]
      gsr_a = gdf["a"]
  
      psr_a.replace(500, 501, inplace=True)
      gsr_a.replace(500, 501, inplace=True)
  
      assert_eq(pdf, gdf)
  
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 8 for calling a global function with example usage: test_setitem_dataframe_series_inplace(df) without return types