code: def check_niimg_3d(niimg, dtype=None):
      """Check that niimg is a proper 3D niimg-like object and load it.
  
      Parameters
      ----------
      niimg : Niimg-like object
          See :ref:`extracting_data`.
          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.
  
      Returns
      -------
      result : 3D Niimg-like object
          Result can be nibabel.Nifti1Image or the input, as-is. It is guaranteed
          that the returned object has an affine attribute and that its data can
          be retrieved with nilearn.image.get_data.
  
      Notes
      -----
      In nilearn, special care has been taken to make image manipulation easy.
      This method is a kind of pre-requisite for any data processing method in
      nilearn because it checks if data have a correct format and loads them if
      necessary.
  
      Its application is idempotent.
  
      """
      return check_niimg(niimg, ensure_ndim=3, 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 6 for calling a global function with example usage: check_niimg_3d(niimg, dtype) and returns: check_niimg