def _is_index_ready(collection: Collection, index_name: str) -> bool:
    """
    Check for the index name in the list of available search indexes.

     This confirms that the specified index is of status READY.

    Args:
        collection (Collection): MongoDB Collection to for the search indexes
        index_name (str): Vector Search Index name

    Returns:
        bool : True if the index is present and READY false otherwise

    """
    search_indexes = collection.list_search_indexes(index_name)

    for index in search_indexes:
        if index["status"] == "READY":
            return True
    return False

    Check for the index name in the list of available search indexes.

     This confirms that the specified index is of status READY.

    Args:
        collection (Collection): MongoDB Collection to for the search indexes
        index_name (str): Vector Search Index name

    Returns:
        bool : True if the index is present and READY false otherwise

    
llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/llama_index/vector_stores/mongodb/index.py