def priority(value):
    """Decorate a function to be executed with higher or lower priority.

    :param str value: one of ``high``, ``medium``, or ``low``;
                      defaults to ``medium``

    The priority allows you to control the order of callable execution, if your
    plugin needs it.
    """
    def add_attribute(function):
        function.priority = value
        return function
    return add_attribute