def timeout_handler(interval, recurring = None):
def decorator(func):<EOL><INDENT>"""<STR_LIT>"""<EOL>func._pyxmpp_timeout = interval<EOL>func._pyxmpp_recurring = recurring<EOL>return func<EOL><DEDENT>return decorator<EOL>
Method decorator generator for decorating event handlers.

    To be used on `TimeoutHandler` subclass methods only.

    :Parameters:
        - `interval`: interval (in seconds) before the method will be called.
        - `recurring`: When `True`, the handler will be called each `interval`
          seconds, when `False` it will be called only once. If `True`,
          then the handler should return the next interval or `None` if it
          should not be called again.
    :Types:
        - `interval`: `float`
        - `recurring`: `bool`