def METHOD_NAME(image_set, monkeypatch):
    """Can generate an index for an s3 bucket."""
    client = MagicMock()
    client.projects_service_list_project_cluster_bindings.return_value = None
    client.data_connection_service_list_data_connections.return_value = None
    client.data_connection_service_get_data_connection_folder_index.return_value = None
    client.data_connection_service_get_data_connection_artifacts_page.return_value = None
    monkeypatch.setattr(dataset_index, "LightningClient", MagicMock(return_value=client))
    test_index_path = f"{THIS_DIR}/test_data/test_index.txt"
    test_index_data = get_test_index_data(test_index_path)
    # test_local_bucket = "data/test_dataset"
    index_path = os.path.join(THIS_DIR, "index_2.txt")
    got_index = get_index(s3_connection_path=image_set, index_file_path=index_path)
    assert got_index
    generated_index = get_test_index_data(index_path)
    assert len(test_index_data) == len(generated_index)
    item_from_gen_list = list(dict.fromkeys([item.split("/")[-1] for item in generated_index if "jpeg" in item]))
    assert sorted(test_index_data) == sorted(item_from_gen_list)