def METHOD_NAME(
    items: list[T],
    optimization: Literal["min", "max"],
    scoring_fn: Callable[[T], float],
) -> list[T]:
    """
    >>> take_best([], 'min', lambda x: x)
    []
    >>> take_best([3, 2, 1], 'min', lambda x: x)
    [1]
    >>> take_best([3, 4, 5], 'max', lambda x: x)
    [5]
    >>> take_best([4, 1, -1, -1], 'min', lambda x: x)
    [-1, -1]
    """
    best_score = float("-inf") if optimization == "max" else float("inf")
    besties = []
    for item in items:
        score = scoring_fn(item)
        if (optimization == "max" and score > best_score) or (
            optimization == "min" and score < best_score
        ):
            best_score = score
            besties = [item]
        elif score == best_score:
            besties.append(item)
        else:
            continue
    return besties