docstr: Test to check general optimiser returns the correct position corresponding to the best cost 
docstr_tok: ["Test","to","check","general","optimiser","returns","the","correct","position","corresponding","to","the","best","cost"]
code: def test_general_correct_pos(self, options, optimizer):
      """Test to check general optimiser returns the correct position corresponding to the best cost"""
      cost, pos = optimizer.optimize(sphere, iters=5)
      # find best pos from history
      min_cost_idx = np.argmin(optimizer.cost_history)
      min_pos_idx = np.argmin(
          sphere(optimizer.pos_history[min_cost_idx])
      )
      assert np.array_equal(
          optimizer.pos_history[min_cost_idx][min_pos_idx], pos
      )
  
imports: import inspect
  import numpy
  import pytest
  import pyswarms.backend.topology
  from pyswarms.single import GeneralOptimizerPSO
  from pyswarms.utils.functions.single_obj import sphere
  from .abc_test_optimizer import ABCTestOptimizer
label_desc: Use image node_id 10 for calling the TestGeneralOptimizer obj's underlying member method code with example usage: obj.test_general_correct_pos(options, optimizer) without return types