input: 
  class HashTable:
      def __init__(self):
          self.table = [[] for _ in range(256)]
  
      def insert(self, key, value):
          """ Inserts a key-value pair into the hash table. If the key already exists, it updates the value.
          >>> ht = HashTable()
          >>> ht.insert('a', 1)
          >>> ht.retrieve('a')
          1
          """
          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):
          """ Retrieves the value associated with the given key. If the key does not exist, it returns None.
          >>> ht = HashTable()
          >>> ht.insert('a', 1)
          >>> ht.retrieve('a')
          1
          >>> ht.retrieve('b')
          None
          """
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return kv[1]
          return None
  
      def delete(self, key):
          """ Deletes the key-value pair associated with the given key. If the key does not exist, it does nothing.
          >>> ht = HashTable()
          >>> ht.insert('a', 1)
          >>> ht.delete('a')
          >>> ht.retrieve('a')
          None
          """
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  del self.table[h][i]
                  return
  
output:     def __contains__(self, key):
          """ Checks if the given key exists in the hash table.
          >>> ht = HashTable()
          >>> ht.insert('a', 1)
          >>> 'a' in ht
          True
          >>> 'b' in ht
          False
          """
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return True
          return False