code: def test_csa_nitem():
      # testing csa.read's ability to raise an error when n_items >= 200
      with pytest.raises(csa.CSAReadError):
          csa.read(CSA_STR_1001n_items)
      # OK when < 1000
      csa_info = csa.read(CSA_STR_valid)
      assert len(csa_info["tags"]) == 1
      # OK after changing module global
      n_items_thresh = csa.MAX_CSA_ITEMS
      try:
          csa.MAX_CSA_ITEMS = 2000
          csa_info = csa.read(CSA_STR_1001n_items)
          assert len(csa_info["tags"]) == 1
      finally:
          csa.MAX_CSA_ITEMS = n_items_thresh
  
file_path: nibabel/nibabel/nicom/tests/test_csareader.py
imports: import gzip
  import sys
  from copy import deepcopy
  from os.path import join
  import numpy
  import pytest
  from ..None import csareader
  from ..None import dwiparams
  from .None import dicom_test, pydicom
  from .test_dicomwrappers import DATA, IO_DATA_PATH
label_desc: Use image node_id 4 for calling a global function with example usage: test_csa_nitem() without return types