docs: def with_defaults(self, obj):
          """
          Given a dict of hyperparameter settings, return a dict containing
          those settings augmented by the defaults for any keys missing from
          the dict.
          """
          self.check_valid_keys(obj)
          obj = dict(obj)
          for (key, value) in self.defaults.items():
              if key not in obj:
                  obj[key] = value
          return obj