def set_default_attr(obj: object, attr_name_to_set: str, value,
    default_value=None):
    """Set a default attr if it doesn't already exist."""
    if not hasattr(obj, attr_name_to_set):
        setattr(obj, attr_name_to_set, value or default_value)
