input: Write a function to connect to a MySQL database and print the connection object.
  assert connect_to_database("localhost", "yourusername", "yourpassword") is not None
  assert isinstance(connect_to_database("localhost", "yourusername", "yourpassword"), mysql.connector.connection_cext.CMySQLConnection)
output: def connect_to_database(host, user, password):
      import mysql.connector
      try:
          connection = mysql.connector.connect(
              host=host,
              user=user,
              password=password
          )
          print(connection)
          return connection
      except mysql.connector.Error as err:
          print(f"Error: {err}")
          return None