input: Write a python function to retrieve all records from a MySQL database.
  assert get_records() == [{'id': 1, 'name': 'John Doe', 'age': 30}, {'id': 2, 'name': 'Jane Smith', 'age': 25}]
  assert get_records() == []
  assert get_records() == [{'id': 3, 'name': 'Alice Johnson', 'age': 22}]
output: def get_records():
      import mysql.connector
      from mysql.connector import Error
  
      try:
          connection = mysql.connector.connect(
              host='localhost',
              database='your_database_name',
              user='your_username',
              password='your_password'
          )
  
          if connection.is_connected():
              cursor = connection.cursor(dictionary=True)
              cursor.execute("SELECT * FROM your_table_name")
              records = cursor.fetchall()
              return records
  
      except Error as e:
          print(f"Error: {e}")
          return []
  
      finally:
          if connection.is_connected():
              cursor.close()
              connection.close()