code: def test_unavailable_input():
      class WithInput(nib.BaseInterface):
          class input_spec(nib.TraitedSpec):
              foo = nib.traits.Int(3, usedefault=True, max_ver="0.5")
  
          _version = "0.4"
  
          def _run_interface(self, runtime):
              return runtime
  
      class WithoutInput(WithInput):
          _version = "0.6"
  
      has = WithInput()
      hasnot = WithoutInput()
      trying_anyway = WithoutInput(foo=3)
      assert has.inputs.foo == 3
      assert not nib.isdefined(hasnot.inputs.foo)
      assert trying_anyway.inputs.foo == 3
  
      has.run()
      hasnot.run()
      with pytest.raises(Exception):
          trying_anyway.run()
  
      # Still settable
      has.inputs.foo = 4
      hasnot.inputs.foo = 4
      trying_anyway.inputs.foo = 4
      assert has.inputs.foo == 4
      assert hasnot.inputs.foo == 4
      assert trying_anyway.inputs.foo == 4
  
      has.run()
      with pytest.raises(Exception):
          hasnot.run()
      with pytest.raises(Exception):
          trying_anyway.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 13 for calling a global function with example usage: test_unavailable_input() and returns: runtime