code: def test_rra_roulette_selection():
      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],
      )
  
      fitness = [1 for _ in range(search_space.n_agents)]
  
      new_rra = rra.RRA()
  
      idx = new_rra._roulette_selection(fitness)
  
      assert idx >= 0
  
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 4 for calling a global function with example usage: test_rra_roulette_selection() and returns: np