input: Write a function to implement a hash table in Python that supports insert, delete, and retrieve operations. The hash table should initialize with a size of 256 and handle collisions using chaining. The insert method should update the value if the key already exists. The retrieve method should return the value associated with the key or None if the key is not found. The delete method should remove the key-value pair if the key exists. If the key does not exist, it should do nothing. The hash table should be implemented as a class named HashTable.
  assert hash_table.insert("key1", "value1")==None
  assert hash_table.insert("key2", "value2")==None
  assert hash_table.retrieve("key1")=="value1"
  assert hash_table.retrieve("key3")==None
  assert hash_table.delete("key1")==None
  assert hash_table.delete("key3")==None
output: class HashTable:
      def __init__(self):
          self.size = 256
          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
          bucket.append((key, 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