def val2list(val: Union[List, Tuple, Any], repeat_time=1) -> List:
    """Repeat `val` for `repeat_time` times and return the list or val if list/tuple."""
    if isinstance(val, (list, tuple)):
        return list(val)
    return [val for _ in range(repeat_time)]
Repeat `val` for `repeat_time` times and return the list or val if list/tuple.
tridet/modeling/backbone/omni_scripts/utils.py