code: def test_tournament_selection():
      fitness = [1, 2, 3, 4]
  
      selected = general.tournament_selection(fitness, 2)
  
      assert len(selected) == 2
  
imports: import numpy
  from opytimizer.math import general
label_desc: Use image node_id 4 for calling a global function with example usage: test_tournament_selection() without return types