code: def write_fake_bold_img(
      file_path, shape, affine=np.eye(4), random_state=0
  ):
      """Generate a random image of given shape and write it to disk.
  
      Parameters
      ----------
      file_path : :obj:`str`
          Output file path.
  
      shape : :obj:`tuple` of :obj:`int`
          Shape of output array. Should be at least 3D.
  
      affine : :obj:`numpy.ndarray`, default=np.eye(4)
          Affine of returned images.
  
      random_state : :obj:`int` or :obj:`numpy.random.RandomState` instance, \
                     default=0
          Random number generator, or seed.
  
      Returns
      -------
      file_path : :obj:`str`
          Output file path.
  
      """
      rand_gen = np.random.default_rng(random_state)
      data = rand_gen.standard_normal(shape)
      data[1:-1, 1:-1, 1:-1] += 100
      Nifti1Image(data, affine).to_filename(file_path)
      return file_path
  
imports: from __future__ import annotations
  import itertools
  import json
  import string
  from pathlib import Path
  import numpy
  import pandas
  import scipy.linalg
  import scipy.signal
  from nibabel import Nifti1Image
  from scipy.ndimage import binary_dilation
  from nilearn import datasets, image, maskers, masking
  from nilearn._utils import as_ndarray, logger
  from nilearn.interfaces.bids.utils import bids_entities, check_bids_label, create_bids_filename
  from nilearn.interfaces.fmriprep.tests._testing import get_legal_confound
label_desc: Use image node_id 10 for calling a global function with example usage: write_fake_bold_img(file_path, shape, affine, random_state) and returns: file_path