def completeMultipartUpload(self, bucketName, eventualKeyName, uploadId):
        keys = self.listKeysWithPrefix(bucketName, uploadId)

        partIdsAndKeys = sorted([(int(keyname[len(uploadId):]),keyname) for keyname,_,_ in keys])
        res = ""

        assert len(partIdsAndKeys) <= 1000

        for _,keyname in partIdsAndKeys:
            res = res + self.getKeyValue(bucketName, keyname)
            self.deleteKey(bucketName, keyname)

        self.setKeyValue(bucketName, eventualKeyName, res)
dataset/ETHPy150Open ufora/ufora/ufora/distributed/S3/InMemoryS3Interface.py/InMemoryS3Interface.completeMultipartUpload/original