code: def test_update(self):
      BasicTestMappingProtocol.test_update(self)
      # mapping argument
      d = self._empty_mapping()
      d.update({1: 100})
      d.update({2: 20})
      d.update({1: 1, 2: 2, 3: 3})
      self.assertEqual(d, {1: 1, 2: 2, 3: 3})
  
      # no argument
      d.update()
      self.assertEqual(d, {1: 1, 2: 2, 3: 3})
  
      # keyword arguments
      d = self._empty_mapping()
      d.update(x=100)
      d.update(y=20)
      d.update(x=1, y=2, z=3)
      self.assertEqual(d, {"x": 1, "y": 2, "z": 3})
  
      # item sequence
      d = self._empty_mapping()
      d.update([("x", 100), ("y", 20)])
      self.assertEqual(d, {"x": 100, "y": 20})
  
      # Both item sequence and keyword arguments
      d = self._empty_mapping()
      d.update([("x", 100), ("y", 20)], x=1, y=2)
      self.assertEqual(d, {"x": 1, "y": 2})
  
      # iterator
      d = self._full_mapping({1: 3, 2: 4})
      d.update(self._full_mapping({1: 2, 3: 4, 5: 6}).items())
      self.assertEqual(d, {1: 2, 2: 4, 3: 4, 5: 6})
  
      class SimpleUserDict:
          def __init__(self):
              self.d = {1: 1, 2: 2, 3: 3}
  
          def keys(self):
              return self.d.keys()
  
          def __getitem__(self, i):
              return self.d[i]
  
      d.clear()
      d.update(SimpleUserDict())
      self.assertEqual(d, {1: 1, 2: 2, 3: 3})
  
imports: import unittest
  import collections
  from test.support import Py_C_RECURSION_LIMIT
label_desc: Use image node_id 10 for calling the TestMappingProtocol obj's underlying member method code with example usage: obj.test_update() and returns: self, self