code: def test_cmdline(tmp_path):
      default_script_file = str(tmp_path / "testscript")
      ri = r.RCommand(
          script="1 + 1", script_file=default_script_file, rfile=False
      )
      r_cmd = r.get_r_command()
  
      assert ri.cmdline == r_cmd + (' -e "1 + 1"')
  
      assert ri.inputs.script == "1 + 1"
      assert ri.inputs.script_file == default_script_file
      assert not os.path.exists(
          ri.inputs.script_file
      ), "scriptfile should not exist"
      assert not os.path.exists(
          default_script_file
      ), "default scriptfile should not exist."
  
imports: import os
  import pytest
  from nipype.interfaces import r
label_desc: Use image node_id 1 for calling a global function with example usage: test_cmdline(tmp_path) without return types