code: def _img_3d_mni(affine=_affine_mni()):
      data_positive = np.zeros((7, 7, 3))
      rng = _rng()
      data_rng = rng.random((7, 7, 3))
      data_positive[1:-1, 2:-1, 1:] = data_rng[1:-1, 2:-1, 1:]
      return Nifti1Image(data_positive, affine)
  
imports: import warnings
  import nibabel
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from nilearn import image
  from nilearn.datasets.tests._testing import request_mocker
  from nilearn.datasets.tests._testing import temp_nilearn_data_dir
  from nilearn.experimental.surface.tests.conftest import make_mini_img, mini_img, mini_mesh
label_desc: Use image node_id 21 for calling a global function with example usage: _img_3d_mni(affine) and returns: Nifti1Image