code: def _check_restart_params(self, restart_strategy, min_beta, s_greedy,
                                xi_restart):
          r
  
          if restart_strategy is None:
              return True
  
          if self.mode != 'regular':
              raise ValueError('Restarting strategies can only be used with '
                               'regular mode.')
  
          greedy_params_check = (min_beta is None or s_greedy is None or
                                 s_greedy <= 1)
  
          if restart_strategy == 'greedy' and greedy_params_check:
              raise ValueError('You need a min_beta and an s_greedy > 1 for '
                               'greedy restart.')
  
          if xi_restart is None or xi_restart >= 1:
              raise ValueError('You need a xi_restart < 1 for restart.')
  
          return True
docs: r""" Check restarting parameters
  
          This method checks that the restarting parameters are set and satisfy
          the correct assumptions. It also checks that the current mode is
          regular (as opposed to CD for now).
  
          Parameters
          ----------
          restart_strategy: str or None
              name of the restarting strategy. If None, there is no restarting.
              Defaults to None.
          min_beta: float or None
              the minimum beta when using the greedy restarting strategy.
              Defaults to None.
          s_greedy: float or None.
              parameter for the safeguard comparison in the greedy restarting
              strategy. It has to be > 1.
              Defaults to None.
          xi_restart: float or None.
              mutlitplicative parameter for the update of beta in the greedy
              restarting strategy and for the update of r_lazy in the adaptive
              restarting strategies. It has to be > 1.
              Defaults to None.
  
          Returns
          -------
          bool: True
  
          Raises
          ------
          ValueError
              When a parameter that should be set isn't or doesn't verify the
              correct assumptions.