input: Write a python function to insert a list of documents into a MongoDB collection using bulk_write.
  assert insert_documents([{'name': 'Alice'}, {'name': 'Bob'}], 'database_name', 'collection_name') == 2
  assert insert_documents([{'name': 'Charlie'}, {'name': 'David'}, {'name': 'Eve'}], 'database_name', 'collection_name') == 3
  assert insert_documents([{'name': 'Frank'}], 'database_name', 'collection_name') == 1
output: from pymongo import MongoClient, InsertOne
  
  def insert_documents(documents, database_name, collection_name):
      client = MongoClient()
      db = client[database_name]
      collection = db[collection_name]
      
      operations = [InsertOne(doc) for doc in documents]
      result = collection.bulk_write(operations)
      
      return result.inserted_count