Currently the function is defined as #/hackeriet/mqtt/__init__.py def on_connect(mosq, obj, rc, bogus):