code: def test_minip_cutoff():
      """
      Ensure fragments are properly discarded based on the minip_cutoff
      for the minip rendering method
      """
      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 = 120.0
  
          # just surface of the cube is ones, but it should win over the twos inside
          data = np.ones((80, 80, 80), dtype=np.uint8)
          data[1:-1, 1:-1, 1:-1] = 2
  
          vol = scene.visuals.Volume(
              data,
              interpolation="nearest",
              method="minip",
              clim=(0, 2),
              cmap="grays",
              parent=v.scene,
          )
  
          # we should see gray (half of cmap)
          rendered = c.render()
          assert np.array_equal(rendered[40, 40], [128, 128, 128, 255])
  
          # discard fragments above -10 (everything)
          vol.minip_cutoff = -10
          # we should see black
          rendered = c.render()
          assert np.array_equal(rendered[40, 40], [0, 0, 0, 255])
  
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 14 for calling a global function with example usage: test_minip_cutoff() without return types