from typing import Optional
from typing import List


def _handle_lmax_parameter(lmax) -> Optional[List[int]]:
    """Prepare iterable for lmax."""
    if isinstance(lmax, int):
        return [lmax]
    elif isinstance(lmax, List):
        return lmax
    else:
        raise ValueError('Unknown type for lmax')