def METHOD_NAME(response):
    """Async handling of the server response"""
    if thinking_defer and not thinking_defer.called:
        # abort the thinking message if we were fast enough
        thinking_defer.cancel()
    if response:
        # remember this response
        self._add_to_memory(character, self, response)
    else:
        response = "... I'm sorry, I was distracted. Can you repeat?"
    response = self.response_template.format(
        name=self.get_display_name(character), response=response
    )
    # tell the character about it
    if character.location:
        character.location.msg_contents(
            response,
            mapping={"character": character},
            from_obj=self,
        )
    else:
        # fallback if character is not in a location
        character.msg(f"{self.get_display_name(character)} says, {response}")