code: def get_vector(csa_dict, tag_name, n):
      try:
          items = csa_dict["tags"][tag_name]["items"]
      except KeyError:
          return None
      if len(items) == 0:
          return None
      if len(items) != n:
          raise ValueError("Expecting %d vector" % n)
      return np.array(items)
  
file_path: nibabel/nibabel/nicom/csareader.py
imports: import numpy
  from .structreader import Unpacker
  from .utils import find_private_section
label_desc: Use image node_id 4 for calling a global function with example usage: get_vector(csa_dict, tag_name, n) and returns: np, None, None