input: Write a function to create a Python script that refreshes a given table of data in a PostgreSQL database every 5 minutes. The function should establish a connection to the database, execute a refresh command, and use a scheduling library to repeat this process every 5 minutes. If no table name is provided, the function should raise a ValueError.
  assert (refresh_data("TableName")==None)
  assert (refresh_data(None)==ValueError)
output: def refresh_data(table_name):
      if table_name is None:
          raise ValueError("Table name must be provided")
      
      import psycopg2
      from apscheduler.schedulers.background import BackgroundScheduler
      
      def refresh_table():
          conn = psycopg2.connect(
              dbname="your_dbname",
              user="your_username",
              password="your_password",
              host="your_host",
              port="your_port"
          )
          cur = conn.cursor()
          cur.execute(f"REFRESH MATERIALIZED VIEW {table_name};")
          conn.commit()
          cur.close()
          conn.close()
      
      scheduler = BackgroundScheduler()
      scheduler.add_job(refresh_table, 'interval', minutes=5)
      scheduler.start()