input: Write a function to implement a hash table in Python that supports insert, delete and retrieve operations. The function should be designed to handle key-value pairs and manage collisions using chaining. The hash table should use a fixed size of 256 buckets. If the key exists in the table, insert should update the value, retrieve should return the value associated with the key, and delete should remove the key-value pair from the table. If the key is not found during a retrieve or delete operation, the function should return None or take no action, respectively.
  
  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]
          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
  
  assert HashTable().retrieve("nonexistent") == None
  ht = HashTable()
  ht.insert("key1", "value1")
  assert ht.retrieve("key1") == "value1"
  ht.insert("key1", "newvalue1")
  assert ht.retrieve("key1") == "newvalue1"
  ht.delete("key1")
  assert ht.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]
          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