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_velocity() gives the expected shape and range
docstr_tok: ["Test","if","compute_velocity","(",")","gives","the","expected","shape","and","range"]
code: def test_compute_velocity_return_values(
      self, topology, swarm, clamp, static
  ):
      """Test if compute_velocity() gives the expected shape and range"""
      topo = topology(static=static)
      v = topo.compute_velocity(swarm, clamp)
      assert v.shape == swarm.position.shape
      if clamp is not None:
          assert (clamp[0] <= v).all() and (clamp[1] >= v).all()
  
file_path: pyswarms/tests/backend/topology/abc_test_topology.py
imports: import abc
  import pytest
label_desc: Use image node_id 3 for calling the ABCTestTopology obj's underlying member method code with example usage: obj.test_compute_velocity_return_values(topology, swarm, clamp, static) without return types