input: 
  class HashTable:
      def __init__(self):
          self.table = [[] for _ in range(256)]
   
      def insert(self, key, value):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  self.table[h][i] = (key, value)
                  return
          self.table[h].append((key, value))
   
      def retrieve(self, key):
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return kv[1]
          return None
   
      def delete(self, key):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  del self.table[h][i]
                  return
          return None
  
  # Test cases
  # 1. Insert, retrieve, and delete operations
  hash_table = HashTable()
  hash_table.insert("key1", "value1")
  assert hash_table.retrieve("key1") == "value1"
  hash_table.delete("key1")
  assert hash_table.retrieve("key1") == None
  
  # 2. Inserting two entries with the same key
  hash_table.insert("key2", "value2")
  hash_table.insert("key2", "new_value2")
  assert hash_table.retrieve("key2") == "new_value2"
  
  # 3. Retrieve from an empty table
  assert hash_table.retrieve("nonexistent_key") == None
  
output:     
      def update(self, key, value):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  self.table[h][i] = (key, value)
                  return
          self.table[h].append((key, value))
  
      def contains(self, key):
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return True
          return False
  
      def keys(self):
          keys_list = []
          for bucket in self.table:
              for kv in bucket:
                  keys_list.append(kv[0])
          return keys_list
  
      def values(self):
          values_list = []
          for bucket in self.table:
              for kv in bucket:
                  values_list.append(kv[1])
          return values_list
  
      def items(self):
          items_list = []
          for bucket in self.table:
              for kv in bucket:
                  items_list.append(kv)
          return items_list
  
  # Test cases
  # 4. Update an existing key
  hash_table.update("key2", "updated_value2")
  assert hash_table.retrieve("key2") == "updated_value2"
  
  # 5. Check if a key exists
  assert hash_table.contains("key2") == True
  assert hash_table.contains("nonexistent_key") == False
  
  # 6. Get all keys
  assert set(hash_table.keys()) == {"key2"}
  
  # 7. Get all values
  assert set(hash_table.values()) == {"updated_value2"}
  
  # 8. Get all items
  assert set(hash_table.items()) == {("key2", "updated_value2")}
  