code: def test_volume():
      vol = np.zeros((20, 20, 20), "float32")
      vol[8:16, 8:16, :] = 1.0
  
      # Create
      V = scene.visuals.Volume(vol)
      assert V.clim == (0, 1)
      assert V.method == "mip"
      assert V.interpolation == "linear"
  
      # Set wrong data
      with raises(ValueError):
          V.set_data(np.zeros((20, 20), "float32"))
  
      # Clim
      V.set_data(vol, (0.5, 0.8))
      assert V.clim == (0.5, 0.8)
      with raises(ValueError):
          V.set_data((0.5, 0.8, 1.0))
  
      # Method
      V.method = "iso"
      assert V.method == "iso"
  
      # Interpolation
      V.interpolation = "nearest"
      assert V.interpolation == "nearest"
  
      # Step size
      V.relative_step_size = 1.1
      assert V.relative_step_size == 1.1
      # Disallow 0 step size to avoid GPU stalling
      with raises(ValueError):
          V.relative_step_size = 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 1 for calling a global function with example usage: test_volume() without return types