code: def test_find_mlab_cmd_defaults():
      saved_env = dict(os.environ)
  
      class TestClass(spm.SPMCommand):
          pass
  
      # test without FORCE_SPMMCR, SPMMCRCMD set
      for varname in ["FORCE_SPMMCR", "SPMMCRCMD"]:
          try:
              del os.environ[varname]
          except KeyError:
              pass
      dc = TestClass()
      assert dc._use_mcr is None
      assert dc._matlab_cmd is None
      # test with only FORCE_SPMMCR set
      os.environ["FORCE_SPMMCR"] = "1"
      dc = TestClass()
      assert dc._use_mcr
      assert dc._matlab_cmd is None
      # test with both, FORCE_SPMMCR and SPMMCRCMD set
      os.environ["SPMMCRCMD"] = "spmcmd"
      dc = TestClass()
      assert dc._use_mcr
      assert dc._matlab_cmd == "spmcmd"
      # restore environment
      os.environ.clear()
      os.environ.update(saved_env)
  
file_path: nipype/nipype/interfaces/spm/tests/test_base.py
imports: import os
  import numpy
  import pytest
  from nipype.testing.fixtures import create_files_in_directory
  import nipype.interfaces.spm.base
  from nipype.interfaces.spm import no_spm
  import nipype.interfaces.matlab
  from nipype.interfaces.spm.base import SPMCommandInputSpec
  from nipype.interfaces.base import traits
label_desc: Use image node_id 3 for calling a global function with example usage: test_find_mlab_cmd_defaults() without return types