code: def test_volume_depth():
      """Check that depth setting is properly performed for the volume visual
  
      Render a volume with a blue ball in front of a red plane in front of a
      blue plane, checking that the output image contains both red and blue pixels.
      """
      # A blue strip behind a red strip
      # If depth is set correctly, we should see only red pixels
      # the screen
      blue_vol = np.zeros((80, 80, 80), dtype=np.uint8)
      blue_vol[:, -1, :] = 1  # back plane blue
      blue_vol[30:50, 30:50, 30:50] = 1  # blue in center
  
      red_vol = np.zeros((80, 80, 80), dtype=np.uint8)
      red_vol[:, -5, :] = 1  # red plane in front of blue plane
  
      with TestingCanvas(size=(80, 80)) as c:
          v = c.central_widget.add_view(border_width=0)
          v.camera = "arcball"
          v.camera.fov = 0
          v.camera.center = (40, 40, 40)
          v.camera.scale_factor = 80.0
  
          scene.visuals.Volume(
              red_vol,
              interpolation="nearest",
              clim=(0, 1),
              cmap="reds",
              parent=v.scene,
          )
  
          scene.visuals.Volume(
              blue_vol,
              interpolation="nearest",
              clim=(0, 1),
              cmap="blues",
              parent=v.scene,
          )
  
          # render
          rendered = c.render()
          reds = np.sum(rendered[:, :, 0])
          greens = np.sum(rendered[:, :, 1])
          blues = np.sum(rendered[:, :, 2])
          assert reds > 0
          np.testing.assert_allclose(greens, 0)
          assert blues > 0
  
imports: import pytest
  import numpy
  from vispy import scene
  from vispy.testing import TestingCanvas, requires_application, run_tests_if_main, requires_pyopengl, raises
  from vispy.testing.image_tester import assert_image_approved, downsample
  from vispy.testing.rendered_array_tester import compare_render, max_for_dtype
label_desc: Use image node_id 12 for calling a global function with example usage: test_volume_depth() without return types