code: def test_detect_chained_assignment_doc_example(
      self, using_copy_on_write, warn_copy_on_write
  ):
      # Doc example
      df = DataFrame(
          {
              "a": ["one", "one", "two", "three", "two", "one", "six"],
              "c": Series(range(7), dtype="int64"),
          }
      )
      assert df._is_copy is None
  
      indexer = df.a.str.startswith("o")
      if using_copy_on_write or warn_copy_on_write:
          with tm.raises_chained_assignment_error():
              df[indexer]["c"] = 42
      else:
          with pytest.raises(SettingWithCopyError, match=msg):
              df[indexer]["c"] = 42
  
imports: from string import ascii_letters
  import numpy
  import pytest
  from pandas.errors import SettingWithCopyError, SettingWithCopyWarning
  import pandas
  from pandas import DataFrame, Index, Series, Timestamp, date_range, option_context
  import pandas._testing
label_desc: Use image node_id 5 for calling the TestChaining obj's underlying member method code with example usage: obj.test_detect_chained_assignment_doc_example(using_copy_on_write, warn_copy_on_write) without return types