input: Write a function to implement a hash table in Python that supports insert, delete and retrieve operations. The hash table should store key-value pairs and use a customized hash function to determine the index in the table. If the given key exists, the insert operation should update its value. If the key does not exist, it should be added to the table. The retrieve operation should return the value associated with the given key if it exists, otherwise return None. The delete operation should remove the key-value pair from the table if it exists. If the key does not exist, the operation should do nothing. The hash table should handle collisions using chaining.
  
  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]
   
      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]
  
  assert HashTable().insert("key1", "value1") == None
  assert HashTable().retrieve("key1") == "value1"
  assert HashTable().delete("key1") == None
  assert HashTable().retrieve("key1") == None
output: 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]
   
      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]