async def METHOD_NAME(self, plugin_ctx):
    curr_user_id = plugin_ctx.session.get('user', {'id': None})['id']
    api_key = self._get_api_key(plugin_ctx)
    hash_key = self._hash_key(api_key)
    if api_key and hash_key in self._zones:
        zone = self._zones[hash_key]
        if self.is_anonymous(curr_user_id):
            plugin_ctx.session.clear()
        plugin_ctx.session['user'] = dict(
            id=zone.user_id, user='api_user', fullname=zone.user_info)
    else:
        if not self.is_anonymous(curr_user_id):
            plugin_ctx.session.clear()
        plugin_ctx.session['user'] = self.anonymous_user(plugin_ctx)