from typing import Union
from typing import List


def translate_years(years: Union[int, List[int]]) -> str:
    """
    Checks user input and translates close matches into acceptable string format for API requests.

    Args:
        years(int | List[int]): a single 4-digit year or list of 4-digit years.

    Returns:
        String
    """
    if isinstance(years, int):
        return str(years)
    return ','.join([str(year) for year in years])