  try:
      import yaml
  except ImportError:
      _HAS_YAML = False
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 
</s> remove     yaml = None
 </s> add     _HAS_YAML = False </s> remove         for idx, model in enumerate(get_all_sub_models(self._model)):
 </s> add         for idx, model in enumerate(get_all_sub_models(self.model)): </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)}" </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 writing to '{}': {}".format(filename, err.strerror)
 </s> add             msg = f"Error writing to '{filename}': {err.strerror}"
    _HAS_YAML = True
  try:
      import yaml
    _HAS_YAML = True
  except ImportError:
      _HAS_YAML = False
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
keep add keep keep keep keep
 Core updates
   - Change loss loading mechanism
   - Autosize tooltips based on content size
   - Random linting + code modernisation 
lib/serializer.py