from typing import Union
from typing import Dict
from typing import List
from typing import Any


def _func_minimum(
    target_attr: Union[
        Dict[Union[float, int], Union[float, int]], List[Union[float, int]]
    ],
    *_: Any,
) -> Union[float, int]:
    """Function for returning the minimum element of a list or dictionary."""
    try:
        return min(target_attr)
    except ValueError as error:
        raise ValueError(
            "To use the 'minimum' function, all elements within target_attr has to be"
            " of type 'int' or 'float'."
        ) from error