code: def clear(self):
          
          for attachment in self.__attachments:
              if attachment.on_cloud:
                  self.__removed_attachments.append(attachment)
          self.__attachments = []
          self._update_parent_attachments()
          self._track_changes()
docs: Clear the attachments