input: def refresh_data_automatically(database: str, table_name: str, host: str = "localhost", user: str = "user", password: str = "password") -> None:
      """
      Refresh a given table of data in a PostgreSQL database every 5 minutes.
      >>> refresh_data_automatically("db", "TableName")
      (Runs indefinitely, refreshing the table "TableName" every 5 minutes)
      """
output:     import psycopg2
      import time
  
      def refresh_table(db, table):
          conn = psycopg2.connect(database=db, host=host, user=user, password=password)
          cur = conn.cursor()
          cur.execute(f"REFRESH MATERIALIZED VIEW {table};")
          conn.commit()
          cur.close()
          conn.close()
  
      while True:
          refresh_table(database, table_name)
          time.sleep(300)