ModPresenceDemo.on_presence

You're seeing just the function on_presence, go back to ModPresenceDemo module for more information.
Link to this function

on_presence(user, server, resource, packet)