input: Write a function to implement a hash table in Python that supports insert, delete and retrieve operations. The hash table should use a list of lists to handle collisions. Define the class HashTable with an initializer that sets up the table, and three methods: insert, retrieve, and delete. Provide assert statements to test the functionality of the hash table.
  assert True == isinstance(HashTable(), HashTable)
  assert 2 == HashTable().insert('a', 2)
  assert 2 == HashTable().retrieve('a')
  assert None == HashTable().delete('a')
  assert None == HashTable().retrieve('a')
output: class HashTable:
      def __init__(self):
          self.size = 10
          self.table = [[] for _ in range(self.size)]
  
      def _hash(self, key):
          return hash(key) % self.size
  
      def insert(self, key, value):
          hash_key = self._hash(key)
          bucket = self.table[hash_key]
          for i, (k, v) in enumerate(bucket):
              if k == key:
                  bucket[i] = (key, value)
                  return value
          bucket.append((key, value))
          return value
  
      def retrieve(self, key):
          hash_key = self._hash(key)
          bucket = self.table[hash_key]
          for k, v in bucket:
              if k == key:
                  return v
          return None
  
      def delete(self, key):
          hash_key = self._hash(key)
          bucket = self.table[hash_key]
          for i, (k, v) in enumerate(bucket):
              if k == key:
                  del bucket[i]
                  return v
          return None