def corrupt_object(self, id_):
        idx = self.open_index()
        segment, offset = idx[('%032d' % id_).encode('ascii')]
        with open(os.path.join(self.tmppath, 'repository', 'data', '0', str(segment)), 'r+b') as fd:
            fd.seek(offset)
            fd.write(b'BOOM')
dataset/ETHPy150Open borgbackup/borg/borg/testsuite/repository.py/RepositoryCheckTestCase.corrupt_object/original