code: def _embedded_frames(frame_list, frame_format):
      
      template = '  frames[{0}] = "data:image/{1};base64,{2}"\n'
      embedded = "\n"
      for i, frame_data in enumerate(frame_list):
          embedded += template.format(i, frame_format,
                                      frame_data.replace('\n', '\\\n'))
      return embedded
docs: frame_list should be a list of base64-encoded png files