code: def test_crashfile_creation(tmp_path):
      pipe = pe.Workflow(name="pipe", base_dir=str(tmp_path))
      pipe.config["execution"]["crashdump_dir"] = str(tmp_path)
      pipe.add_nodes(
          [
              pe.Node(
                  interface=Function(function=crasher), name="crasher"
              )
          ]
      )
      sgelike_plugin = SGELikeBatchManagerBase("")
      with pytest.raises(RuntimeError) as e:
          assert pipe.run(plugin=sgelike_plugin)
  
      crashfiles = list(tmp_path.glob("crash*crasher*.pklz")) + list(
          tmp_path.glob("crash*crasher*.txt")
      )
      assert len(crashfiles) == 1
  
file_path: nipype/nipype/pipeline/plugins/tests/test_sgelike.py
imports: from nipype.pipeline.plugins.base import SGELikeBatchManagerBase
  from nipype.interfaces.utility import Function
  import nipype.pipeline.engine
  import pytest
  from unittest.mock import patch
  import subprocess
label_desc: Use image node_id 4 for calling a global function with example usage: test_crashfile_creation(tmp_path) without return types