class_docstr: Abstract class that defines various tests for topologies
  
  Whenever a topology inherits from ABCTestTopology,
  you don't need to write down all tests anymore. Instead, you can just
  specify all required fixtures in the test suite.
docstr: Test if compute_position() gives the expected shape and range
docstr_tok: ["Test","if","compute_position","(",")","gives","the","expected","shape","and","range"]
code: def test_compute_position_return_values(
      self, topology, swarm, bounds, static
  ):
      """Test if compute_position() gives the expected shape and range"""
      topo = topology(static=static)
      p = topo.compute_position(swarm, bounds)
      assert p.shape == swarm.velocity.shape
      if bounds is not None:
          assert (bounds[0] <= p).all() and (bounds[1] >= p).all()
  
file_path: pyswarms/tests/backend/topology/abc_test_topology.py
imports: import abc
  import pytest
label_desc: Use image node_id 4 for calling the ABCTestTopology obj's underlying member method code with example usage: obj.test_compute_position_return_values(topology, swarm, bounds, static) without return types