def METHOD_NAME(dev):
    my_cmd = struct.Struct("<LHHQ")
    sub_cmd_in = 0xAA55
    indata = my_cmd.pack(sub_cmd_in, 0x1234, 0x5678, int(time.time()))
    outdata = dev.cmd(MRPC_ECHO, indata, len(indata))
    sub_cmd_out, param1, param2, time_val = my_cmd.unpack(outdata)
    if sub_cmd_in != ~sub_cmd_out & 0xFFFFFFFF:
        raise CommandError("Echo data did not match: {:x} != ~{:x}".
                           format(sub_cmd_in, sub_cmd_out))