code: def test_setitem_with_view_copies(
      using_copy_on_write, warn_copy_on_write
  ):
      df = DataFrame({"a": [1, 2, 3], "b": 1, "c": 1})
      view = df[:]
      expected = df.copy()
  
      df["b"] = 100
      arr = get_array(df, "a")
      with tm.assert_cow_warning(warn_copy_on_write):
          df.iloc[0, 0] = 100  # Check that we correctly track reference
      if using_copy_on_write:
          assert not np.shares_memory(arr, get_array(df, "a"))
          tm.assert_frame_equal(view, expected)
  
file_path: pandas/pandas/tests/copy_view/test_core_functionalities.py
imports: import numpy
  import pytest
  from pandas import DataFrame
  import pandas._testing
  from pandas.tests.copy_view.util import get_array
label_desc: Use image node_id 3 for calling a global function with example usage: test_setitem_with_view_copies(using_copy_on_write, warn_copy_on_write) without return types