code: def test_craft(spec):
      """Check that crafting works and is inverse to str coercion."""
      crafted_obj = craft(spec)
  
      new_spec = str(crafted_obj)
  
      crafted_again = craft(new_spec)
  
      assert crafted_again == crafted_obj
  
imports: import pytest
  from sktime.registry._craft import craft, deps, imports
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 1 for calling a global function with example usage: test_craft(spec) without return types