input: from typing import Optional
  
  def retrieve_value(hash_table: HashTable, key: object) -> Optional[object]:
      """Retrieve the value associated with a given key in a hash table.
      If the key is present, return its associated value; otherwise, return None.
      >>> hash_table = HashTable()
      >>> hash_table.insert('example_key', 'example_value')
      >>> retrieve_value(hash_table, 'example_key')
      'example_value'
      >>> retrieve_value(hash_table, 'nonexistent_key')
      None
      """
output:     index = hash_table.hash_function(key)
      if hash_table.table[index] is not None:
          for k, v in hash_table.table[index]:
              if k == key:
                  return v
      return None