def prepare_megabench_data(dataset_name, dataset_subset_name):
    """
        Prepare the MEGA-Bench dataset for evaluation.
        Return:
            subset_dataset: The organized data of the specified subset
            all_dataset: The organized data of all tasks, used for evaluation
    """
    from datasets import load_dataset
    if "single_image" in dataset_subset_name:
        core_data = load_dataset(dataset_name, "core_single_image")
        open_data = load_dataset(dataset_name, "open_single_image")
    else:
        core_data = load_dataset(dataset_name, "core")
        open_data = load_dataset(dataset_name, "open")
    core_test_samples = list(core_data["test"])
    organized_core_dataset = organize_hf_dataset(core_test_samples)
    open_test_samples = list(open_data["test"])
    organized_open_dataset = organize_hf_dataset(open_test_samples)
    subset_dataset = organized_core_dataset if "core" in dataset_subset_name else organized_open_dataset
    all_dataset = organized_core_dataset + organized_open_dataset
    return subset_dataset, all_dataset

        Prepare the MEGA-Bench dataset for evaluation.
        Return:
            subset_dataset: The organized data of the specified subset
            all_dataset: The organized data of all tasks, used for evaluation
    
vlmeval/dataset/utils/megabench/utils.py