def METHOD_NAME():
    """
    Method transmits status events to the specific channel
    :return:
    """
    class StatusListener(SubscribeCallback):
        def status(self, pubnub, status):
            event = "unknown"
            if status.operation == PNOperationType.PNSubscribeOperation \
                    and status.category == PNStatusCategory.PNConnectedCategory:
                event = "Connect"
            elif status.operation == PNOperationType.PNUnsubscribeOperation \
                    and status.category == PNStatusCategory.PNAcknowledgmentCategory:
                event = "Unsubscribe"
            asyncio.ensure_future(pubnub.publish().channel('status-' + APP_KEY).message({
                "event": event
            }).future(), loop=loop)
        def presence(self, pubnub, presence):
            pass
        def message(self, pubnub, message):
            pass
    listener = StatusListener()
    pubnub.add_listener(listener)