code: def update_model_params(self, **params):
          r
          for key, value in params.items():
              if not hasattr(self, key):
                  setattr(self, key, value)  # set parameter for the first time.
              elif getattr(self, key) is None:
                  setattr(self, key, value)  # update because this parameter is still None.
              elif value is not None:
                  setattr(self, key, value)
docs: r"""Update given model parameter if they are set to specific values