code: def test_rra_update():
      def square(x):
          return np.sum(x**2)
  
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_rra = rra.RRA()
  
      new_rra.tol = 1e10
      new_rra.max_stall = 1
      new_rra.update(search_space, square)
  
      new_rra.tol = 1e-500
      new_rra.update(search_space, square)
  
file_path: opytimizer/tests/opytimizer/optimizers/evolutionary/test_rra.py
imports: import numpy
  from opytimizer.optimizers.evolutionary import rra
  from opytimizer.spaces import search
label_desc: Use image node_id 5 for calling a global function with example usage: test_rra_update() and returns: np