code: def test_writeback_also_writes_immediately(self):
      # Issue 5754
      d = {}
      key = "key"
      encodedkey = key.encode("utf-8")
      with shelve.Shelf(d, writeback=True) as s:
          s[key] = [1]
          p1 = d[
              encodedkey
          ]  # Will give a KeyError if backing store not updated
          s["key"].append(2)
      p2 = d[encodedkey]
      self.assertNotEqual(p1, p2)
  
imports: import unittest
  import dbm
  import shelve
  import pickle
  import os
  from test.support import os_helper
  from collections.abc import MutableMapping
  from test.test_dbm import dbm_iterator
  from test import mapping_tests
label_desc: Use image node_id 12 for calling the TestCase obj's underlying member method code with example usage: obj.test_writeback_also_writes_immediately() without return types