docstr: Test if compute_gbest() gives the expected return values
code: def test_compute_gbest_return_values(
      self, swarm, topology, options, static
  ):
      """Test if compute_gbest() gives the expected return values"""
      topo = topology(static=static)
      expected_cost = 1.0002528364353296
      expected_pos = np.array(
          [9.90438476e-01, 2.50379538e-03, 1.87405987e-05]
      )
      pos, cost = topo.compute_gbest(swarm, **options)
      assert cost == pytest.approx(expected_cost)
      assert pos[np.argmin(cost)] == pytest.approx(expected_pos)
  
file_path: pyswarms/tests/backend/topology/test_pyramid.py
imports: import numpy
  import pytest
  from pyswarms.backend.topology import Pyramid
  from .abc_test_topology import ABCTestTopology
label_desc: Use image node_id 3 for calling the TestPyramidTopology obj's underlying member method code with example usage: obj.test_compute_gbest_return_values(swarm, topology, options, static) without return types