human
Complete this python program:
def interval(*args):
assistant
#Here is the Python code you requested.

    """Decorates a function to be called by the bot every X seconds.
    This decorator can be used multiple times for multiple intervals, or all
    intervals can be given at once as arguments. The first time the function
    will be called is X seconds after the bot was started.
    Unlike other plugin functions, ones decorated by interval must only take a
    :class:`sopel.bot.Sopel` as their argument; they do not get a trigger. The
    bot argument will not have a context, so functions like ``bot.say()`` will
    not have a default destination.
    There is no guarantee that the bot is connected to a server or joined a
    channel when the function is called, so care must be taken.
    Example:::
    import sopel.module
    @sopel.module.interval(5)
    def spam_every_5s(bot):
    if "#here" in bot.channels:
    bot.msg("#here", "It has been five seconds!")
    """
    def add_attribute(function):
        if (not hasattr(function, u'interval')):
            function.interval = []
        for arg in args:
            function.interval.append(arg)
        return function
    return add_attribute