code: def test_bunch_hash():
      # NOTE: Since the path to the json file is included in the Bunch,
      # the hash will be unique to each machine.
      json_pth = pkgrf(
          "nipype", os.path.join("testing", "data", "realign_json.json")
      )
  
      b = nib.Bunch(infile=json_pth, otherthing="blue", yat=True)
      newbdict, bhash = b._get_bunch_hash()
      assert bhash == "d1f46750044c3de102efc847720fc35f"
      # Make sure the hash stored in the json file for `infile` is correct.
      jshash = md5()
      with open(json_pth) as fp:
          jshash.update(fp.read().encode("utf-8"))
      assert newbdict["infile"][0][1] == jshash.hexdigest()
      assert newbdict["yat"] is True
  
file_path: nipype/nipype/interfaces/base/tests/test_support.py
imports: import os
  import pytest
  from pkg_resources import resource_filename
  from ....utils.filemanip import md5
  from ...None import base
label_desc: Use image node_id 5 for calling a global function with example usage: test_bunch_hash() without return types