def get_index_stats(index_name: str, marqo_config: config.Config = Depends(get_config)):
    """
    Provides information about the index, including the number of documents and vectors in the index. Please refer to
    [Index Stats API document](https://docs.marqo.ai/latest/reference/api/stats/get-index-stats/) for details.
    """
    stats = marqo_config.monitoring.get_index_stats_by_name(index_name)
    return {
        'numberOfDocuments': stats.number_of_documents,
        'numberOfVectors': stats.number_of_vectors,
        'backend': {
            'memoryUsedPercentage': stats.backend.memory_used_percentage,
            'storageUsedPercentage': stats.backend.storage_used_percentage
        }
    }

    Provides information about the index, including the number of documents and vectors in the index. Please refer to
    [Index Stats API document](https://docs.marqo.ai/latest/reference/api/stats/get-index-stats/) for details.
    
src/marqo/tensor_search/api.py