code: def test_q_vector_etc():
      # Test diffusion params in wrapper classes
      # Default is no q_vector, b_value, b_vector
      dw = didw.Wrapper(DATA)
      assert dw.q_vector is None
      assert dw.b_value is None
      assert dw.b_vector is None
      for pos in range(3):
          q_vec = np.zeros((3,))
          q_vec[pos] = 10.0
          # Reset wrapped dicom to refresh one_time property
          dw = didw.Wrapper(DATA)
          dw.q_vector = q_vec
          assert_array_equal(dw.q_vector, q_vec)
          assert dw.b_value == 10
          assert_array_equal(dw.b_vector, q_vec / 10.0)
      # Reset wrapped dicom to refresh one_time property
      dw = didw.Wrapper(DATA)
      dw.q_vector = np.array([0, 0, 1e-6])
      assert dw.b_value == 0
      assert_array_equal(dw.b_vector, np.zeros((3,)))
      # Test MosaicWrapper
      sdw = didw.MosaicWrapper(DATA)
      exp_b, exp_g = EXPECTED_PARAMS
      assert_array_almost_equal(
          sdw.q_vector, exp_b * np.array(exp_g), 5
      )
      assert_array_almost_equal(sdw.b_value, exp_b)
      assert_array_almost_equal(sdw.b_vector, exp_g)
      # Reset wrapped dicom to refresh one_time property
      sdw = didw.MosaicWrapper(DATA)
      sdw.q_vector = np.array([0, 0, 1e-6])
      assert sdw.b_value == 0
      assert_array_equal(sdw.b_vector, np.zeros((3,)))
  
imports: import gzip
  from copy import copy
  from decimal import Decimal
  from hashlib import sha1
  from os.path import dirname
  from os.path import join
  from unittest import TestCase
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ...tests.nibabel_data import get_nibabel_data, needs_nibabel_data
  from ...volumeutils import endian_codes
  from ..None import dicomreaders
  from ..None import dicomwrappers
  from .None import dicom_test, have_dicom, pydicom
label_desc: Use image node_id 6 for calling a global function with example usage: test_q_vector_etc() without return types