from typing import Union
from typing import List


def to_list(x: Union[int, List]) -> List[int]:
    """Ensure parameter is list of integer(s)."""
    if isinstance(x, list):
        return x
    return [x]