input: from typing import List, Tuple
  import psycopg2
  from datetime import datetime, timedelta
  import schedule
  import time
  
  def refresh_table_every_5_minutes(host: str, database: str, user: str, password: str, table_name: str) -> bool:
      """
      Given the details of a PostgreSQL database and a table name, this function refreshes the table every 5 minutes.
      
      >>> refresh_table_every_5_minutes("localhost", "db", "user", "password", "TableName")
      True
      """
output:     def refresh_table():
          try:
              conn = psycopg2.connect(host=host, database=database, user=user, password=password)
              cur = conn.cursor()
              cur.execute(f"REFRESH MATERIALIZED VIEW {table_name};")
              conn.commit()
              cur.close()
              conn.close()
          except Exception as e:
              print(f"Error refreshing table: {e}")
              return False
          return True
  
      schedule.every(5).minutes.do(refresh_table)
  
      while True:
          schedule.run_pending()
          time.sleep(1)