def move_folder(self, to_folder, *, update_parent_if_changed=True):
to_folder_id = to_folder.folder_id if isinstance(to_folder,<EOL>Folder) else to_folder<EOL>if self.root or not self.folder_id or not to_folder_id:<EOL><INDENT>return False<EOL><DEDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.folder_id))<EOL>response = self.con.post(url,<EOL>data={self._cc('<STR_LIT>'): to_folder_id})<EOL>if not response:<EOL><INDENT>return False<EOL><DEDENT>folder = response.json()<EOL>parent_id = folder.get(self._cc('<STR_LIT>'), None)<EOL>if parent_id and self.parent_id:<EOL><INDENT>if parent_id != self.parent_id:<EOL><INDENT>self.parent_id = parent_id<EOL>self.parent = (self.get_parent_folder()<EOL>if update_parent_if_changed else None)<EOL><DEDENT><DEDENT>return True<EOL>
Move this folder to another folder

        :param to_folder: the destination Folder/folder_id to move into
        :type to_folder: mailbox.Folder or str
        :param bool update_parent_if_changed: updates self.parent with the
         new parent Folder if changed
        :return: The new folder after copying
        :rtype: mailbox.Folder or None