code: def test_mesh_bounds():
      # Create 3D visual
      vertices, filled_indices, outline_indices = create_cube()
      axis = scene.visuals.Mesh(
          vertices["position"],
          outline_indices,
          color="black",
          mode="lines",
      )
  
      # Test bounds for all 3 axes
      for i in range(3):
          np.testing.assert_allclose(axis.bounds(i), (-1.0, 1.0))
  
      # Create 2D visual using projection of cube
      axis = scene.visuals.Mesh(
          vertices["position"][:, :2],
          outline_indices,
          color="black",
          mode="lines",
      )
  
      # Test bounds for first 2 axes
      for i in range(2):
          np.testing.assert_allclose(axis.bounds(i), (-1.0, 1.0))
      # Test bounds for 3rd axis
      np.testing.assert_allclose(axis.bounds(2), (0.0, 0.0))
  
file_path: vispy/vispy/visuals/tests/test_mesh.py
imports: import numpy
  from vispy import scene
  from vispy.color import Color
  from vispy.geometry import create_cube, create_sphere
  from vispy.testing import TestingCanvas, requires_application, run_tests_if_main, requires_pyopengl
  from vispy.visuals.filters import ShadingFilter, WireframeFilter
  from vispy.visuals.filters.mesh import _as_rgba
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_mesh_bounds() without return types