async def METHOD_NAME(self, message, subject):
    clientCallID = "unknown-client-call-id"
    try:
        clientCallID = message["client-call-id"]
        methodName = message["method-name"]
        arguments = message.get("arguments", [])
        methodHandler = getattr(subject, methodName, None)
        if getattr(methodHandler, "fontraRemoteMethod", False):
            returnValue = await methodHandler(*arguments, connection=self)
            if is_dataclass(returnValue):
                returnValue = asdict(returnValue)
            elif (
                isinstance(returnValue, list)
                and returnValue
                and is_dataclass(returnValue[0])
            ):
                returnValue = [asdict(item) for item in returnValue]
            response = {"client-call-id": clientCallID, "return-value": returnValue}
        else:
            response = {
                "client-call-id": clientCallID,
                "exception": f"unknown method {methodName}",
            }
    except Exception as e:
        logger.error("uncaught exception: %r", e)
        if self.verboseErrors:
            traceback.print_exc()
        response = {"client-call-id": clientCallID, "exception": repr(e)}
    await self.sendMessage(response)