def METHOD_NAME(self, params: Union[str, List[Union[int, str]]]):
    if isinstance(params, str):
        if params.upper() == ALL_TOKEN:
            return params.upper()
    if isinstance(params, List):
        return flatten_iterable(params)
    raise ValueError(
        "unsupported type ({}) given in {}".format(
            params, "{} for layers".format(self.__class__.__name__)
        )
    )