def METHOD_NAME(library):
    blob = {'foo': dt(2015, 1, 1), 'object': Arctic}
    yesterday = dt.utcnow() - timedelta(days=1, seconds=1)
    _id = bson.ObjectId.from_datetime(yesterday)
    with patch("bson.ObjectId", return_value=_id):
        library.write('BLOB', blob, prune_previous_version=False)
    assert mongo_count(library._collection) == 1
    assert mongo_count(library._collection.versions) == 1
    _id = bson.ObjectId.from_datetime(dt.utcnow() - timedelta(hours=10))
    with patch("bson.ObjectId", return_value=_id):
        library.write('BLOB', blob, prune_previous_version=False)
    assert mongo_count(library._collection) == 1
    assert mongo_count(library._collection.versions) == 2
    # This write should pruned the oldest version in the chunk collection
    library.write('BLOB', {})
    assert mongo_count(library._collection) == 1
    assert mongo_count(library._collection.versions) == 2
    library._delete_version('BLOB', 2)
    assert mongo_count(library._collection) == 0
    assert mongo_count(library._collection.versions) == 1