<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def persist(self, path_to_file):
 """ Saves the image to disk on a file :param path_to_file: path to the target file :type path_to_file: str :return: `None` """

        with open(path_to_file, 'wb') as f:
            f.write(self.data)