def _list(key: str, vals: dict) -> list:
    """Get a key from a dictionary of values and ensure it is a list."""
    result = vals.get(key, [])
    if not isinstance(result, list):
        result = [result]
    return result