code: def test_pixdim_log_checks(self):
      # pixdim can be zero or positive
      HC = self.header_class
      hdr = HC()
      hdr["pixdim"][1] = -2  # severity 35
      fhdr, message, raiser = self.log_chk(hdr, 35)
      assert fhdr["pixdim"][1] == 2
      assert (
          message
          == self._pixdim_message + "; setting to abs of pixdim values"
      )
  
      pytest.raises(*raiser)
  
      hdr = HC()
      hdr["pixdim"][1:4] = 0  # No error or warning
      fhdr, message, raiser = self.log_chk(hdr, 0)
      assert raiser == ()
  
imports: import io
  from os.path import dirname
  from os.path import join
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from packaging.version import Version
  import nibabel
  from nibabel import cifti2
  from nibabel.cifti2.parse_cifti2 import _Cifti2AsNiftiHeader
  from nibabel.tests import test_nifti2
  from nibabel.tests.nibabel_data import get_nibabel_data, needs_nibabel_data
  from nibabel.tmpdirs import InTemporaryDirectory
label_desc: Use image node_id 3 for calling the TestCifti2SingleHeader obj's underlying member method code with example usage: obj.test_pixdim_log_checks() without return types