from typing import Union
from typing import List


def process_seed_arguments(seeds: Union[str, List[int], int]):
    """Seed specification from command line often in string format.

    Args:
        seeds: str encoding of seeds.

    Returns:
        seeds: list of seed ints.
    """
    if isinstance(seeds, int):
        seeds = list(range(seeds))
    elif isinstance(seeds, list):
        pass
    elif isinstance(seeds, str):
        try:
            seeds = [int(seeds.strip("[").strip("]"))]
        except ValueError:
            seeds = [int(s) for s in seeds.strip("[").strip("]").split(",")]
    return seeds