code: def test_series_setitem_both_slice_cow_on():
      with cudf.option_context("copy_on_write", True):
          actual = cudf.Series([1, 2, 3, 4, 5])
          new_copy = actual.copy(deep=False)
  
          actual[slice(0, 2, 1)] = 100
          assert_eq(actual, cudf.Series([100, 100, 3, 4, 5]))
          assert_eq(new_copy, cudf.Series([1, 2, 3, 4, 5]))
  
          new_copy[slice(2, 4, 1)] = 300
          assert_eq(actual, cudf.Series([100, 100, 3, 4, 5]))
          assert_eq(new_copy, cudf.Series([1, 2, 300, 300, 5]))
  
imports: import cupy
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import Series
  from cudf.testing._utils import NUMERIC_TYPES, OTHER_TYPES, assert_eq
label_desc: Use image node_id 8 for calling a global function with example usage: test_series_setitem_both_slice_cow_on() without return types