<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_to_file(self, path):
 """ Dump all cookies to file. Cookies are dumped as JSON-serialized dict of keys and values. """


        with open(path, 'w') as out:
            out.write(json.dumps(self.get_dict()))