code: def test_at_setitem_item_cache_cleared(self):
      # GH#22372 Note the multi-step construction is necessary to trigger
      #  the original bug. pandas/issues/22372#issuecomment-413345309
      df = DataFrame(index=[0])
      df["x"] = 1
      df["cost"] = 2
  
      # accessing df["cost"] adds "cost" to the _item_cache
      df["cost"]
  
      # This loc[[0]] lookup used to call _consolidate_inplace at the
      #  BlockManager level, which failed to clear the _item_cache
      df.loc[[0]]
  
      df.at[0, "x"] = 4
      df.at[0, "cost"] = 789
  
      expected = DataFrame(
          {"x": [4], "cost": 789},
          index=[0],
          columns=Index(["x", "cost"], dtype=object),
      )
      tm.assert_frame_equal(df, expected)
  
      # And in particular, check that the _item_cache has updated correctly.
      tm.assert_series_equal(df["cost"], expected["cost"])
  
imports: from datetime import datetime, timezone
  import numpy
  import pytest
  from pandas.errors import InvalidIndexError
  from pandas import CategoricalDtype, CategoricalIndex, DataFrame, DatetimeIndex, Index, MultiIndex, Series, Timestamp
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestAtSetItem obj's underlying member method code with example usage: obj.test_at_setitem_item_cache_cleared() without return types