def add_attachment_part(self, part):
        counter = 1
        f = {}

        filename = part.get_filename()
        if not filename:
            ext = mimetypes.guess_extension(part.get_content_type())
            if not ext:
                # Use a generic bag-of-bits extension
                ext = '.bin'
            filename = (counter, ext) % 'part-%03d%s'
            counter += 1
        f['filename'] = filename
        f['content_type'] = part.get_content_type()

        content_id = part['Content-ID']
        if content_id:
            f['content_id'] = self.clean_content_id(content_id)
            f['inline'] = True
            self._content_ids[f['content_id']] = f['filename']
        f['data'] = part.get_payload(decode=True)
        self._files[f['filename']] = f
dataset/ETHPy150Open lavr/python-emails/emails/loader/local_store.py/MsgLoader.add_attachment_part/swapped operands of `%`