code: def test_deps(spec):
      """Check that deps retrieves the correct requirement sets."""
      # should return length 0 list since has no deps
      assert deps(simple_spec) == []
  
      # should correctly find the single dependency
      assert deps(simple_spec_with_dep) == ["statsmodels"]
  
      # has multiple estimators with "statsmodels",
      # this should be returned like this and not as ["statsmodels", "statsmodels"]
      assert deps(pipe_spec) == ["statsmodels"]
  
      # example with two dependencies, should be identified, order does not matter
      assert set(deps(dunder_spec)) == {"statsmodels", "pmdarima"}
  
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 2 for calling a global function with example usage: test_deps(spec) without return types