code: def test_switch_case():
      x, y = Symbol("x"), Symbol("y")
      expr = SymbolicExpression.switch_case(x, {0: y, 1: x * 2})
      assert str(expr) == "switch_case(x, {0: y, 1: (x * 2)})"
      assert expr.evaluate({"x": 0, "y": 3}) == 3
      assert expr.evaluate({"x": 1, "y": 3}) == 2
      with pytest.raises(RuntimeError, match="No matching case"):
          expr.evaluate({"x": 2, "y": 3})
  
imports: import pytest
  from nni.mutable.symbol import Symbol, SymbolicExpression
label_desc: Use image node_id 2 for calling a global function with example usage: test_switch_case() without return types