def __deserialize_file(self, response):
fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)<EOL>os.close(fd)<EOL>os.remove(path)<EOL>content_disposition = response.getheader("<STR_LIT>")<EOL>if content_disposition:<EOL><INDENT>filename = re.search(r'<STR_LIT>', content_disposition).group(<NUM_LIT:1>)<EOL>path = os.path.join(os.path.dirname(path), filename)<EOL><DEDENT>with open(path, "<STR_LIT:w>") as f:<EOL><INDENT>f.write(response.data)<EOL><DEDENT>return path<EOL>
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.

:param response:  RESTResponse.
:return: file path.