code: def save_toy_nii(ndarray, filename):
      toy = nb.Nifti1Image(ndarray, np.eye(4))
      nb.nifti1.save(toy, filename)
      return filename
  
file_path: nipype/nipype/testing/utils.py
imports: import os
  import time
  import shutil
  import signal
  import subprocess
  from subprocess import CalledProcessError
  from tempfile import mkdtemp
  from ..utils.misc import package_check
  import numpy
  import nibabel
label_desc: Use image node_id 1 for calling a global function with example usage: save_toy_nii(ndarray, filename) and returns: filename