code: def _check_fov(img, affine, shape):
      """Return True if img's field of view correspond to given \
      shape and affine, False elsewhere."""
      img = check_niimg(img)
      return img.shape[:3] == shape and np.allclose(img.affine, affine)
  
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 1 for calling a global function with example usage: _check_fov(img, affine, shape) and returns: unknown