def METHOD_NAME(self, key, size):
    key = int.from_bytes(key.encode("ascii"), byteorder="big")
    ret = self.cmd(SMCReadKey(KEY = key, SIZE = size))
    if size <= 4:
        return struct.pack("<I", ret.VALUE)[:size]
    else:
        return self.asc.iface.readmem(self.shmem, ret.SIZE)