code: def test_runtime_checks():
      class TestInterface(nib.BaseInterface):
          class input_spec(nib.TraitedSpec):
              a = nib.traits.Any()
  
          class output_spec(nib.TraitedSpec):
              b = nib.traits.Any()
  
          def _run_interface(self, runtime):
              return runtime
  
      class NoRuntime(TestInterface):
          def _run_interface(self, runtime):
              return None
  
      class BrokenRuntime(TestInterface):
          def _run_interface(self, runtime):
              del runtime.__dict__["cwd"]
              return runtime
  
      with pytest.raises(RuntimeError):
          NoRuntime().run()
  
      with pytest.raises(RuntimeError):
          BrokenRuntime().run()
  
imports: import os
  import simplejson
  import logging
  import pytest
  from unittest import mock
  from ....None import config
  from ....testing import example_data
  from ...None import base
  from ..support import _inputs_help
label_desc: Use image node_id 20 for calling a global function with example usage: test_runtime_checks() and returns: runtime, None, runtime