def set_on(instance, attrname, value):
    """
    A cleaner, slightly shorter way of setting values directly on an instance's
    `__dict__`.
    :param instance: instance to store the value on
    :param attrname: name of the attribute to store the value with
    :param value: value to store on the instance
    """
    instance.__dict__[attrname] = value
