input: from typing import Union
  
  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) -> Union[None, any]:
          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
  
      """
      >>> ht = HashTable()
      >>> ht.insert('key1', 'value1')
      >>> ht.retrieve('key1')
      'value1'
      >>> ht.insert('key2', 'value2')
      >>> ht.retrieve('key2')
      'value2'
      >>> ht.delete('key1')
      >>> ht.retrieve('key1')
      None
      """
output:     
      def __contains__(self, key) -> bool:
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return True
          return False
  
      def __len__(self) -> int:
          count = 0
          for bucket in self.table:
              count += len(bucket)
          return count
  
      def keys(self) -> list:
          keys = []
          for bucket in self.table:
              for kv in bucket:
                  keys.append(kv[0])
          return keys
  
      def values(self) -> list:
          values = []
          for bucket in self.table:
              for kv in bucket:
                  values.append(kv[1])
          return values
  
      def items(self) -> list:
          items = []
          for bucket in self.table:
              for kv in bucket:
                  items.append(kv)
          return items
  