input: def refresh_table_periodically(database_host: str, database_name: str, user: str, password: str, table_name: str) -> None:
      """ Refresh a given table of data in a PostgreSQL database every 5 minutes.
      >>> refresh_table_periodically('localhost', 'db', 'user', 'password', 'TableName')
      """
output:     import psycopg2
      import time
  
      while True:
          try:
              conn = psycopg2.connect(
                  host=database_host,
                  dbname=database_name,
                  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}")
          
          time.sleep(300)