from typing import Union
from typing import Iterable
import requests


def get_all_benchmarks(
    without: Union[int, Iterable[int], None] = None, baseURL: str = "https://mapf.nl/"
):
    """
    Get all benchmarks

    :param without: uuids to exclude
    :param baseURL:
    :return:
    """
    if not without:
        without = []
    without = [without] if isinstance(without, int) else without

    r = requests.get(f"{baseURL}/benchmarks/list.json")
    return [problem for problem in r.json() if problem not in without]