code: def optimizer_history(self, options):
      opt = GlobalBestPSO(10, 2, options=options)
      opt.optimize(sphere, 1000)
      return opt
  
file_path: pyswarms/tests/optimizers/test_global_best.py
imports: import pytest
  import numpy
  from pyswarms.single import GlobalBestPSO
  from pyswarms.utils.functions.single_obj import sphere
  from .abc_test_optimizer import ABCTestOptimizer
label_desc: Use image node_id 2 for calling the TestGlobalBestOptimizer obj's underlying member method code with example usage: obj.optimizer_history(options) and returns: opt