def copy_folder(self, to_folder):
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 None<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 None<EOL><DEDENT>folder = response.json()<EOL>self_class = getattr(self, '<STR_LIT>', type(self))<EOL>return self_class(con=self.con, main_resource=self.main_resource,<EOL>**{self._cloud_data_key: folder})<EOL>
Copy this folder and it's contents to into another folder

        :param to_folder: the destination Folder/folder_id to copy into
        :type to_folder: mailbox.Folder or str
        :return: The new folder after copying
        :rtype: mailbox.Folder or None