def METHOD_NAME(dic: Dict[str, Any], key: str, value: Any) -> None:
    """Set if value is non-empty list or not None otherwise remove."""
    if value:
        dic[key] = value
    else:
        dic.pop(key, None)