code: def test_sphere():
      """Test sphere function"""
      md = create_sphere(rows=10, cols=20, radius=10, method="latitude")
      radii = np.sqrt((md.get_vertices() ** 2).sum(axis=1))
      assert radii.dtype.type is np.float32
      assert_allclose(radii, np.ones_like(radii) * 10, atol=1e-06)
      md = create_sphere(subdivisions=5, radius=10, method="ico")
      radii = np.sqrt((md.get_vertices() ** 2).sum(axis=1))
      assert radii.dtype.type is np.float32
      assert_allclose(radii, np.ones_like(radii) * 10, atol=1e-06)
      md = create_sphere(
          rows=20, cols=20, depth=20, radius=10, method="cube"
      )
      radii = np.sqrt((md.get_vertices() ** 2).sum(axis=1))
      assert radii.dtype.type is np.float32
      assert_allclose(radii, np.ones_like(radii) * 10, atol=1e-06)
  
file_path: vispy/vispy/geometry/tests/test_generation.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_allclose
  from vispy.testing import run_tests_if_main
  from vispy.geometry import create_box, create_cube, create_cylinder, create_sphere, create_plane
label_desc: Use image node_id 3 for calling a global function with example usage: test_sphere() without return types