              del recent_files[idx]
          recent_files.insert(0, (filename, command))
          recent_files = recent_files[:20]
          logger.debug("Final recent files: %s", recent_files)
          recent_json = self.serializer.marshal(recent_files)
          with open(recent_filename, "wb") as out:
              out.write(recent_json.encode("utf-8"))
  
  
  class ContextMenu(tk.Menu):  # pylint: disable=too-many-ancestors
      """ Pop up menu """
      def __init__(self, widget):
 
</s> remove             with open(recent_filename, "rb") as inp:
                recent_files = self.serializer.unmarshal(inp.read().decode("utf-8"))
 </s> add             recent_files = self.serializer.load(recent_filename) </s> remove         with open(menu_file, "rb") as inp:
            recent_files = serializer.unmarshal(inp.read().decode("utf-8"))
            logger.debug("Loaded recent files: %s", recent_files)
 </s> add         recent_files = serializer.load(menu_file)
        logger.debug("Loaded recent files: %s", recent_files) </s> remove         recent_files = serializer.marshal(list())
        with open(menu_file, "wb") as out:
            out.write(recent_files.encode("utf-8"))
 </s> add         serializer.save(menu_file, list()) </s> remove         serializer = JSONSerializer
 </s> add         serializer = get_serializer("json") </s> remove from lib import Serializer
 </s> add from lib.serializer import get_serializer, get_serializer_from_filename
        self.serializer.save(recent_filename, recent_files)
              del recent_files[idx]
          recent_files.insert(0, (filename, command))
          recent_files = recent_files[:20]
          logger.debug("Final recent files: %s", recent_files)
        self.serializer.save(recent_filename, recent_files)
        self.serializer.save(recent_filename, recent_files)
        self.serializer.save(recent_filename, recent_files)
  
  
  class ContextMenu(tk.Menu):  # pylint: disable=too-many-ancestors
      """ Pop up menu """
      def __init__(self, widget):
keep keep keep keep replace replace replace keep keep keep keep keep
 Standardize serialization (#903)

* Standardize serialization

- Linting
- Standardize serializer use throughout code
- Extend serializer to load and save files
- Always load and save in utf-8
- Create documentation 
lib/gui/utils.py