code: def check_niimg_4d(niimg, return_iterator=False, dtype=None):
      """Check that niimg is a proper 4D niimg-like object and load it.
  
      Parameters
      ----------
      niimg : 4D Niimg-like object
          See :ref:`extracting_data`.
          If niimgs is an iterable, checks if data is really 4D. Then,
          considering that it is a list of niimg and load them one by one.
          If niimg is a string, consider it as a path to Nifti image and
          call nibabel.load on it.
          If it is an object, check if the affine attribute present and that
          nilearn.image.get_data returns a result, raise TypeError otherwise.
  
      dtype : {dtype, "auto"}, optional
          Data type toward which the data should be converted. If "auto", the
          data will be converted to int32 if dtype is discrete and float32 if it
          is continuous.
  
      return_iterator : boolean, default=False
          If True, an iterator of 3D images is returned. This reduces the memory
          usage when `niimgs` contains 3D images.
          If False, a single 4D image is returned. When `niimgs` contains 3D
          images they are concatenated together.
  
      Returns
      -------
      niimg: 4D nibabel.Nifti1Image or iterator of 3D nibabel.Nifti1Image
  
      Notes
      -----
      This function is the equivalent to check_niimg_3d() for Niimg-like objects
      with a run level.
  
      Its application is idempotent.
  
      """
      return check_niimg(
          niimg,
          ensure_ndim=4,
          return_iterator=return_iterator,
          dtype=dtype,
      )
  
file_path: nilearn/nilearn/_utils/niimg_conversions.py
imports: import glob
  import itertools
  import os.path
  import warnings
  import numpy
  from joblib import Memory
  import nilearn
  from .cache_mixin import cache
  from .exceptions import DimensionError
  from .helpers import stringify_path
  from .niimg import _get_data, load_niimg, safe_get_data
  from .path_finding import resolve_globbing
label_desc: Use image node_id 7 for calling a global function with example usage: check_niimg_4d(niimg, return_iterator, dtype) and returns: check_niimg