async def METHOD_NAME(self, name, data):
    """ Sends a response to backend.
    """
    with buffer_handler.lock:
        log_output = buffer_handler.stream.getvalue()
        buffer_handler.stream.truncate(0)
        buffer_handler.stream.seek(0)
    if not log_output.endswith("\n"):
        log_output += "\n"
    self._wr.write(log_output.encode("utf-8"))
    response = {"name": name, "data": data}
    response = dumps(response)
    self._wr.write(b"#response begin\n")
    self._wr.write(bytes(response + "\n", "utf-8"))
    self._wr.write(b"#response end\n")
    if isinstance(self._wr, asyncio.StreamWriter):
        await self._wr.drain()
    else:
        self._wr.flush()
    log.info(">>> " + name + dumps(data))