def METHOD_NAME(self):
    count = len(self.suitemetadata_ids)
    logger.info('[thread-%s] processing %d suitemetadata' % (self.thread_id, count))
    orphan_metadata = []
    for offset in range(0, count, STEP):
        ids = self.suitemetadata_ids[offset:offset + STEP]
        for metadata in SuiteMetadata.objects.filter(id__in=ids).annotate(**annotations).all():
            # It means there's no SuiteMetadata with fixed suite, so it's safe to change it in place
            if metadata.correct_metadata_id is None:
                if metadata.correct_suite_slug is None:
                    orphan_metadata.append(metadata.id)
                else:
                    try:
                        metadata.suite = metadata.correct_suite_slug
                        metadata.save()
                    except IntegrityError:
                        logger.error('There appears to have a fixed suite metadata already')
                        logger.error('This was not supposed to happen though, check these cases carefuly')
                        logger.error('SuiteMetadata (id: %d, kind=test, suite="%s", name="%s")' % (metadata.id, metadata.suite, metadata.name))
                        return
            # It means there's a correct one, so just update tests
            else:
                Test.objects.order_by().filter(metadata=metadata).update(metadata_id=metadata.correct_metadata_id)
                # It's safe to delete buggy metadata now
                orphan_metadata.append(metadata.id)
        if self.show_progress:
            print('.', end='', flush=True)
    if len(orphan_metadata) > 0:
        logger.info('Deleting %d orphan metadata objects' % len(orphan_metadata))
        chunks = split_list(orphan_metadata, chunk_size=10000)
        for chunk in chunks:
            SuiteMetadata.objects.filter(id__in=chunk).delete()
    logger.info('[thread-%s] done updating' % self.thread_id)