code: def set_params(self, **params):
          
  
          valid_params = self.get_params()
  
          for key, value in params.items():
              if key not in valid_params:
                  raise ValueError(
                      "Invalid parameter %s for estimator %s. "
                      "Check the list of available parameters "
                      "with `estimator.get_params().keys()`."
                      % (key, self.__class__.__name__)
                  )
  
              setattr(self, key, value)
  
          return self
docs: Set the parameters of this estimator.
  
          Returns
          -------
  
          self