def set_attribute(t, key: str, data):
    """
    Set an attribute on a callable.

    Mainly used with decorators to allow the decorators to store data onto the callable

    :param t: the callable to store data onto
    :param key: the key of the data, the attributes name.
    :param data: the data to set, the attributes value
    :return: the callable after the modification

    :exception RuntimeError - Raised if a non callable is given as `t`
    """

    if not callable(t):
        raise RuntimeError("Trying to annotate " + t)
    setattr(t, key, data)
    return t