input: Write a function to implement a hash table in Python that supports insert, delete, and retrieve operations. The class should include an initialization method, and each operation should be implemented as a separate method. Ensure that the class handles collisions by using separate chaining.
  assert HashTable().insert('key1', 'value1')==None
  assert HashTable().retrieve('key1')=='value1'
  assert HashTable().delete('key1')==None
  assert HashTable().retrieve('key1')==None
  assert HashTable().insert('key2', 'value2')==None
  assert HashTable().retrieve('key2')=='value2'
  assert HashTable().delete('key2')==None
  assert HashTable().retrieve('key2')==None
output: class HashTable:
      def __init__(self, size=10):
          self.size = size
          self.table = [[] for _ in range(self.size)]
  
      def _hash(self, key):
          return hash(key) % self.size
  
      def insert(self, key, value):
          index = self._hash(key)
          for kvp in self.table[index]:
              if kvp[0] == key:
                  kvp[1] = value
                  return
          self.table[index].append([key, value])
  
      def retrieve(self, key):
          index = self._hash(key)
          for kvp in self.table[index]:
              if kvp[0] == key:
                  return kvp[1]
          return None
  
      def delete(self, key):
          index = self._hash(key)
          for i, kvp in enumerate(self.table[index]):
              if kvp[0] == key:
                  del self.table[index][i]
                  return