code: def test_param_alias():
      """Tests parameter aliasing with parameter string shorthands.
  
      Raises
      ------
      AssertionError if parameters that should be set via __ are not set
      AssertionError if error that should be raised is not raised
      """
      non_composite = AliasTester(a=42, bar=4242)
      composite = CompositionDummy(foo=non_composite)
  
      # this should write to a of foo, because there is only one suffix called a
      composite.set_params(**{"a": 424242})
      assert composite.get_params()["foo__a"] == 424242
  
      # this should write to bar of composite, because "bar" is a full parameter string
      #   there is a suffix in foo, but if the full string is there, it writes to that
      composite.set_params(**{"bar": 424243})
      assert composite.get_params()["bar"] == 424243
  
      # trying to write to bad_param should raise an exception
      # since bad_param is neither a suffix nor a full parameter string
      with pytest.raises(
          ValueError, match=r"Invalid parameter keys provided to"
      ):
          composite.set_params(**{"bad_param": 424242})
  
      # new example: highly nested composite with identical suffixes
      non_composite1 = composite
      non_composite2 = AliasTester(a=42, bar=4242)
      uber_composite = CompositionDummy(
          foo=non_composite1, bar=non_composite2
      )
  
      # trying to write to a should raise an exception
      # since there are two suffix a, and a is not a full parameter string
      with pytest.raises(
          ValueError, match=r"does not uniquely determine parameter key"
      ):
          uber_composite.set_params(**{"a": 424242})
  
      # same as above, should overwrite "bar" of uber_composite
      uber_composite.set_params(**{"bar": 424243})
      assert uber_composite.get_params()["bar"] == 424243
  
imports: from copy import deepcopy
  import pytest
  from sktime.base import BaseEstimator, BaseObject
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 11 for calling a global function with example usage: test_param_alias() without return types