code: def test_fillna_chained_assignment(using_copy_on_write):
      df = DataFrame({"a": [1, np.nan, 2], "b": 1})
      df_orig = df.copy()
      if using_copy_on_write:
          with tm.raises_chained_assignment_error():
              df["a"].fillna(100, inplace=True)
          tm.assert_frame_equal(df, df_orig)
  
          with tm.raises_chained_assignment_error():
              df[["a"]].fillna(100, inplace=True)
          tm.assert_frame_equal(df, df_orig)
      else:
          with tm.assert_produces_warning(None):
              with option_context("mode.chained_assignment", None):
                  df[["a"]].fillna(100, inplace=True)
  
          with tm.assert_produces_warning(None):
              with option_context("mode.chained_assignment", None):
                  df[df.a > 5].fillna(100, inplace=True)
  
          with tm.assert_produces_warning(
              FutureWarning, match="inplace method"
          ):
              df["a"].fillna(100, inplace=True)
  
imports: import numpy
  import pytest
  from pandas import NA, ArrowDtype, DataFrame, Interval, NaT, Series, Timestamp, interval_range, option_context
  import pandas._testing
  from pandas.tests.copy_view.util import get_array
label_desc: Use image node_id 21 for calling a global function with example usage: test_fillna_chained_assignment(using_copy_on_write) without return types