  
      def _check_extension(self, filename):
          """ Check the filename has an extension. If not add the correct one for the serializer """
          extension = os.path.splitext(filename)[1]
          retval = filename if extension else "{}.{}".format(filename, self.file_extension)
          logger.debug("Original filename: '%s', final filename: '%s'", filename, retval)
          return retval
  
      def load(self, filename):
          """ Load data from an existing serialized file
 
</s> remove             msg = "Error writing to '{}': {}".format(filename, err.strerror)
 </s> add             msg = f"Error writing to '{filename}': {err.strerror}" </s> remove     elif extension in (".yaml", ".yml") and yaml is not None:
 </s> add     elif extension in (".yaml", ".yml") and _HAS_YAML: </s> remove     elif extension in (".yaml", ".yml") and yaml is None:
 </s> add     elif extension in (".yaml", ".yml"): </s> remove             msg = "Error serializing data for type {}: {}".format(type(data), str(err))
 </s> add             msg = f"Error serializing data for type {type(data)}: {str(err)}" </s> remove             msg = "Error unserializing data for type {}: {}".format(type(serialized_data),
                                                                    str(err))
 </s> add             msg = f"Error unserializing data for type {type(serialized_data)}: {str(err)}"
        retval = filename if extension else f"{filename}.{self.file_extension}"
  
      def _check_extension(self, filename):
          """ Check the filename has an extension. If not add the correct one for the serializer """
          extension = os.path.splitext(filename)[1]
        retval = filename if extension else f"{filename}.{self.file_extension}"
          logger.debug("Original filename: '%s', final filename: '%s'", filename, retval)
          return retval
  
      def load(self, filename):
          """ Load data from an existing serialized file
keep keep keep keep replace keep keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
lib/serializer.py