input: Write a function to create a Python script that refreshes a given table of data in a PostgreSQL database every 5 minutes. If the script is running correctly, it should keep refreshing the table until it is stopped.
  
  def refresh_data():
      import psycopg2
      from datetime import datetime, timedelta
      import schedule
      import time
  
      conn = psycopg2.connect(
          host="localhost", 
          database="db", 
          user="user", 
          password="password"
      )
  
      cur = conn.cursor()
      query = 'REFRESH TABLE "TableName";'
      cur.execute(query)
      conn.commit()
  
      schedule.every(5).minutes.do(refresh_data)
  
      while True:
          schedule.run_pending()
          time.sleep(1)
  
  assert refresh_data() is None
  assert refresh_data() is None
  assert refresh_data() is None
  assert refresh_data() is None
  assert refresh_data() is None
output: def refresh_data():
      import psycopg2
      from datetime import datetime, timedelta
      import schedule
      import time
  
      conn = psycopg2.connect(
          host="localhost", 
          database="db", 
          user="user", 
          password="password"
      )
  
      cur = conn.cursor()
      query = 'REFRESH TABLE "TableName";'
      cur.execute(query)
      conn.commit()
  
      schedule.every(5).minutes.do(refresh_data)
  
      while True:
          schedule.run_pending()
          time.sleep(1)