async def _ping(self, ctx):
    memory_buffer = TMemoryOutputBuffer(self._transport.get_request_size_limit())
    oprot = self._protocol_factory.get_protocol(memory_buffer)
    oprot.write_request_headers(ctx)
    oprot.writeMessageBegin('ping', TMessageType.CALL, 0)
    args = ping_args()
    args.write(oprot)
    oprot.writeMessageEnd()
    response_transport = (await self._transport.request(ctx, memory_buffer.getvalue()))
    iprot = self._protocol_factory.get_protocol(response_transport)
    iprot.read_response_headers(ctx)
    (_, mtype, _) = iprot.readMessageBegin()
    if (mtype == TMessageType.EXCEPTION):
        x = TApplicationException()
        x.read(iprot)
        iprot.readMessageEnd()
        if (x.type == TApplicationExceptionType.RESPONSE_TOO_LARGE):
            raise TTransportException(type=TTransportExceptionType.RESPONSE_TOO_LARGE, message=x.message)
        raise x
    result = ping_result()
    result.read(iprot)
    iprot.readMessageEnd()
async def _ping(self, ctx):
    memory_buffer = TMemoryOutputBuffer(self._transport.get_request_size_limit())
    oprot = self._protocol_factory.get_protocol(memory_buffer)
    oprot.write_request_headers(ctx)
    oprot.writeMessageBegin('ping', TMessageType.CALL, 0)
    args = ping_args()
    args.write(oprot)
    oprot.writeMessageEnd()
    response_transport = (await self._transport.request(ctx, memory_buffer.getvalue()))
    iprot = self._protocol_factory.get_protocol(response_transport)
    iprot.read_response_headers(ctx)
    (_, mtype, _) = iprot.readMessageBegin()
    if (mtype == TMessageType.EXCEPTION):
        x = TApplicationException()
        x.read(iprot)
        iprot.readMessageEnd()
        if (x.type == TApplicationExceptionType.RESPONSE_TOO_LARGE):
            raise TTransportException(type=TTransportExceptionType.RESPONSE_TOO_LARGE, message=x.message)
        raise x
    result = ping_result()
    result.read(iprot)
    iprot.readMessageEnd()