          bool
              ``True`` if legacy items exist and state file has been updated, otherwise ``False``
          """
          logger.debug("Checking for legacy state file update")
          priors = ["dssim_loss", "penalized_mask_loss", "mask_type"]
          new_items = ["loss_function", "learn_mask", "mask_type"]
          updated = False
          for old, new in zip(priors, new_items):
              if old not in self.config:
                  logger.debug("Legacy item '%s' not in config. Skipping update", old)
 
</s> remove             if old == "penalized_mask_loss" and new not in self.config:
                self.config[new] = self.config["penalized_mask_loss"]
 </s> add             if old == "mask_type" and new == "learn_mask" and new not in self.config:
                self.config[new] = self.config["mask_type"] is not None </s> remove             if old == "mask_type" and self.config[old] in ("facehull", "dfl_full"):
 </s> add             if old == "mask_type" and new == "mask_type" and self.config[old] in ("facehull",
                                                                                  "dfl_full"): </s> remove             * masks - If `penalized_mask_loss` exists but `learn_mask` does not, then add the
            latter and set to the same value as `penalized_mask_loss`.
 </s> add             * masks - If `learn_mask` does not exist then it is set to ``True`` if `mask_type` is
            not ``None`` otherwised it is set to ``False``.
        priors = ["dssim_loss", "mask_type", "mask_type"]
          bool
              ``True`` if legacy items exist and state file has been updated, otherwise ``False``
          """
          logger.debug("Checking for legacy state file update")
        priors = ["dssim_loss", "mask_type", "mask_type"]
          new_items = ["loss_function", "learn_mask", "mask_type"]
          updated = False
          for old, new in zip(priors, new_items):
              if old not in self.config:
                  logger.debug("Legacy item '%s' not in config. Skipping update", old)
keep keep keep keep replace keep keep keep keep keep
 bugfix: plugins.train.model._base - Legacy update.
Set `learn_mask` to False on legacy models if a `mask_type` does not exist otherwise `True` 
plugins/train/model/_base.py