code: def test_vol_matching():
      # make the Siemens wrapper, check it compares True against itself
      dw_siemens = didw.wrapper_from_data(DATA)
      assert dw_siemens.is_mosaic
      assert dw_siemens.is_csa
      assert dw_siemens.is_same_series(dw_siemens)
      # make plain wrapper, compare against itself
      dw_plain = didw.Wrapper(DATA)
      assert not dw_plain.is_mosaic
      assert not dw_plain.is_csa
      assert dw_plain.is_same_series(dw_plain)
      # specific vs plain wrapper compares False, because the Siemens
      # wrapper has more non-empty information
      assert not dw_plain.is_same_series(dw_siemens)
      # and this should be symmetric
      assert not dw_siemens.is_same_series(dw_plain)
      # we can even make an empty wrapper.  This compares True against
      # itself but False against the others
      dw_empty = didw.Wrapper({})
      assert dw_empty.is_same_series(dw_empty)
      assert not dw_empty.is_same_series(dw_plain)
      assert not dw_plain.is_same_series(dw_empty)
      # Just to check the interface, make a pretend signature-providing
      # object.
  
      class C:
          series_signature = {}
  
      assert dw_empty.is_same_series(C())
  
      # make the Philips wrapper, check it compares True against itself
      dw_philips = didw.wrapper_from_data(DATA_PHILIPS)
      assert dw_philips.is_multiframe
      assert dw_philips.is_same_series(dw_philips)
      # make plain wrapper, compare against itself
      dw_plain_philips = didw.Wrapper(DATA)
      assert not dw_plain_philips.is_multiframe
      assert dw_plain_philips.is_same_series(dw_plain_philips)
      # specific vs plain wrapper compares False, because the Philips
      # wrapper has more non-empty information
      assert not dw_plain_philips.is_same_series(dw_philips)
      # and this should be symmetric
      assert not dw_philips.is_same_series(dw_plain_philips)
      # we can even make an empty wrapper.  This compares True against
      # itself but False against the others
      dw_empty = didw.Wrapper({})
      assert dw_empty.is_same_series(dw_empty)
      assert not dw_empty.is_same_series(dw_plain_philips)
      assert not dw_plain_philips.is_same_series(dw_empty)
  
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 7 for calling a global function with example usage: test_vol_matching() without return types