input: Write a python function to retrieve data from a PostgreSQL database table and return it as a list of tuples.
  assert get_data_from_db('test_table') == [(1, 'Alice', 1000), (2, 'Bob', 1500)]
  assert get_data_from_db('another_table') == [(3, 'Charlie', 2000), (4, 'David', 2500)]
output: def get_data_from_db(table_name):
      import psycopg2
      try:
          connection = psycopg2.connect(
              dbname='your_dbname',
              user='your_user',
              password='your_password',
              host='your_host',
              port='your_port'
          )
          cursor = connection.cursor()
          query = f"SELECT * FROM {table_name};"
          cursor.execute(query)
          data = cursor.fetchall()
          return data
      except (Exception, psycopg2.DatabaseError) as error:
          print(f"Error: {error}")
          return []
      finally:
          if connection is not None:
              cursor.close()
              connection.close()