def remove(self, attachments):
if isinstance(attachments, (list, tuple)):<EOL><INDENT>attachments = ({attachment.name<EOL>if isinstance(attachment, BaseAttachment)<EOL>else attachment for attachment in attachments})<EOL><DEDENT>elif isinstance(attachments, str):<EOL><INDENT>attachments = {attachments}<EOL><DEDENT>elif isinstance(attachments, BaseAttachment):<EOL><INDENT>attachments = {attachments.name}<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>new_attachments = []<EOL>for attachment in self.__attachments:<EOL><INDENT>if attachment.name not in attachments:<EOL><INDENT>new_attachments.append(attachment)<EOL><DEDENT>else:<EOL><INDENT>if attachment.on_cloud:<EOL><INDENT>self.__removed_attachments.append(<EOL>attachment)<EOL><DEDENT><DEDENT><DEDENT>self.__attachments = new_attachments<EOL>self._update_parent_attachments()<EOL>self._track_changes()<EOL>
Remove the specified attachments

        :param attachments: list of attachments
        :type attachments: list[str] or list[Path] or str or Path or dict