  
  try:
      import yaml
  except ImportError:
      yaml = None
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  class Serializer():
 
</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     from tensorflow import pad
 </s> add     from tensorflow import pad  # type:ignore </s> remove     elif serializer.lower() == "yaml" and yaml is not None:
 </s> add     elif serializer.lower() == "yaml" and _HAS_YAML: </s> remove     elif extension in (".yaml", ".yml") and yaml is not None:
 </s> add     elif extension in (".yaml", ".yml") and _HAS_YAML:
    _HAS_YAML = False
  
  try:
      import yaml
  except ImportError:
    _HAS_YAML = False
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  class Serializer():
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