code: def _validate_params(self):
          
          # fit_intercep
          if not isinstance(self.fit_intercept, bool):
              raise ValueError('fit_intercept must be type bool, but found {}'\
                               .format(self.fit_intercept.__class__))
  
          # terms
          if (self.terms is not 'auto') and not (isinstance(self.terms, (TermList, Term, type(None)))):
              raise ValueError('terms must be a TermList, but found '\
                               'terms = {}'.format(self.terms))
  
          # max_iter
          self.max_iter = check_param(self.max_iter, param_name='max_iter',
                                      dtype='int', constraint='>=1',
                                      iterable=False)
  
          # distribution
          if not ((self.distribution in DISTRIBUTIONS)
                  or isinstance(self.distribution, Distribution)):
              raise ValueError('unsupported distribution {}'.format(self.distribution))
          if self.distribution in DISTRIBUTIONS:
              self.distribution = DISTRIBUTIONS[self.distribution]()
  
          # link
          if not ((self.link in LINKS) or isinstance(self.link, Link)):
              raise ValueError('unsupported link {}'.format(self.link))
          if self.link in LINKS:
              self.link = LINKS[self.link]()
  
          # callbacks
          if not isiterable(self.callbacks):
              raise ValueError('Callbacks must be iterable, but found {}'\
                               .format(self.callbacks))
  
          if not all([c in CALLBACKS or
                      isinstance(c, CallBack) for c in self.callbacks]):
              raise ValueError('unsupported callback(s) {}'.format(self.callbacks))
          callbacks = list(self.callbacks)
          for i, c in enumerate(self.callbacks):
              if c in CALLBACKS:
                  callbacks[i] = CALLBACKS[c]()
          self.callbacks = [validate_callback(c) for c in callbacks]
docs: method to sanitize model parameters
  
          Parameters
          ---------
          None
  
          Returns
          -------
          None