code: def test_datetimeindex_isocalendar(using_copy_on_write):
      dt = date_range("2019-12-31", periods=3, freq="D")
      ser = Series(dt)
      df = DatetimeIndex(ser).isocalendar()
      expected = df.index.copy(deep=True)
      ser.iloc[0] = Timestamp("2020-12-31")
      if using_copy_on_write:
          tm.assert_index_equal(df.index, expected)
  
imports: import pytest
  from pandas import DatetimeIndex, Series, Timestamp, date_range
  import pandas._testing
label_desc: Use image node_id 4 for calling a global function with example usage: test_datetimeindex_isocalendar(using_copy_on_write) without return types