code: def test(
      label=None,
      verbose=1,
      extra_argv=None,
      doctests=False,
      coverage=False,
      raise_warnings=None,
      timer=False,
  ):
      """
      Run tests for nibabel using pytest
  
      The protocol mimics the ``numpy.testing.NoseTester.test()``.
      Not all features are currently implemented.
  
      Parameters
      ----------
      label : None
          Unused.
      verbose: int, optional
          Verbosity value for test outputs. Positive values increase verbosity, and
          negative values decrease it. Default is 1.
      extra_argv : list, optional
          List with any extra arguments to pass to pytest.
      doctests: bool, optional
          If True, run doctests in module. Default is False.
      coverage: bool, optional
          If True, report coverage of NumPy code. Default is False.
          (This requires the
          `coverage module <https://nedbatchelder.com/code/modules/coveragehtml>`_).
      raise_warnings : None
          Unused.
      timer : False
          Unused.
  
      Returns
      -------
      code : ExitCode
          Returns the result of running the tests as a ``pytest.ExitCode`` enum
      """
      import pytest
  
      args = []
  
      if label is not None:
          raise NotImplementedError("Labels cannot be set at present")
  
      verbose = int(verbose)
      if verbose > 0:
          args.append("-" + "v" * verbose)
      elif verbose < 0:
          args.append("-" + "q" * -verbose)
  
      if extra_argv:
          args.extend(extra_argv)
      if doctests:
          args.append("--doctest-modules")
      if coverage:
          args.extend(["--cov", "nibabel"])
      if raise_warnings is not None:
          raise NotImplementedError(
              "Warning filters are not implemented"
          )
      if timer:
          raise NotImplementedError("Timing is not implemented")
  
      args.extend(["--pyargs", "nibabel"])
  
      return pytest.main(args=args)
  
imports: import os
  from .info import long_description
  from .pkg_info import __version__
  from .None import analyze
  from .None import ecat, imagestats, mriutils
  from .None import nifti1
  from .None import orientations
  from .None import spm2analyze
  from .None import spm99analyze
  from .None import streamlines, viewers
  from .analyze import AnalyzeHeader, AnalyzeImage
  from .arrayproxy import is_proxy
  from .cifti2 import Cifti2Header, Cifti2Image
  from .fileholders import FileHolder, FileHolderError
  from .freesurfer import MGHImage
  from .funcs import as_closest_canonical, concat_images, four_to_three, squeeze_image
  from .gifti import GiftiImage
  from .imageclasses import all_image_classes
  from .loadsave import load, save
  from .minc1 import Minc1Image
  from .minc2 import Minc2Image
  from .nifti1 import Nifti1Header, Nifti1Image, Nifti1Pair
  from .nifti2 import Nifti2Header, Nifti2Image, Nifti2Pair
  from .orientations import OrientationError, aff2axcodes, apply_orientation, flip_axis, io_orientation
  from .spm2analyze import Spm2AnalyzeHeader, Spm2AnalyzeImage
  from .spm99analyze import Spm99AnalyzeHeader, Spm99AnalyzeImage
  from .pkg_info import get_pkg_info
label_desc: Use image node_id 2 for calling a global function with example usage: test(label, verbose, extra_argv, doctests, coverage, raise_warnings, timer) and returns: pytest