code: def test_new_img_like_side_effect(img1):
      hash1 = joblib.hash(img1)
      new_img_like(
          img1,
          np.ones((2, 2, 2, 2)),
          img1.affine.copy(),
          copy_header=True,
      )
      hash2 = joblib.hash(img1)
      assert hash1 == hash2
  
file_path: nilearn/nilearn/_utils/tests/test_niimg.py
imports: from pathlib import Path
  import joblib
  import nibabel
  import numpy
  import pytest
  from nibabel import Nifti1Header, Nifti1Image
  from nilearn._utils import load_niimg, niimg, testing
  from nilearn.image import get_data, new_img_like
label_desc: Use image node_id 2 for calling a global function with example usage: test_new_img_like_side_effect(img1) without return types