code: def _update(self):
          r
  
          # Step 1 from alg.10.7.
          self._grad.get_grad(self._z_old)
          y_old = self._z_old - self._beta * self._grad.grad
  
          # Step 2 from alg.10.7.
          self._x_new = self._prox.op(y_old, extra_factor=self._beta)
  
          # Step 5 from alg.10.7.
          self._z_new = self._x_old + self._lambda * (self._x_new - self._x_old)
  
          # Restarting step from alg.4-5 in [L2018]
          if self._is_restart(self._z_old, self._x_new, self._x_old):
              self._z_new = self._x_new
  
          # Update old values for next iteration.
          np.copyto(self._x_old, self._x_new)
          np.copyto(self._z_old, self._z_new)
  
          # Update parameter values for next iteration.
          self._update_param()
  
          # Test cost function for convergence.
          if self._cost_func:
              self.converge = self.any_convergence_flag() or \
                              self._cost_func.get_cost(self._x_new)
docs: r"""Update
  
          This method updates the current reconstruction
  
          Notes
          -----
          Implements algorithm 10.7 (or 10.5) from [B2011]_