input: Write a function to insert a record into a MySQL database using mysql.connector.
  assert insert_record("John", "USA") == 1
  assert insert_record("Jane", "Canada") == 1
  assert insert_record("Alice", "Germany") == 1
output: def insert_record(name, country):
      import mysql.connector
      from mysql.connector import Error
  
      try:
          # Establish the database connection
          connection = mysql.connector.connect(
              host='localhost',
              database='your_database_name',
              user='your_username',
              password='your_password'
          )
  
          if connection.is_connected():
              cursor = connection.cursor()
  
              # Create the insert query
              sql_insert_query = """INSERT INTO your_table_name (name, country) VALUES (%s, %s)"""
              record = (name, country)
              cursor.execute(sql_insert_query, record)
  
              # Commit the transaction
              connection.commit()
  
              # Check if the record was inserted
              if cursor.rowcount == 1:
                  return 1
  
      except Error as e:
          print("Error while connecting to MySQL", e)
          return 0
  
      finally:
          if connection.is_connected():
              cursor.close()
              connection.close()
  
      return 0