code: def test_symbolic_execution():
      a = Categorical([1, 2], label="a")
      b = Categorical([3, 4], label="b")
      c = Categorical([5, 6], label="c")
      d = a + b + 3 * c
      assert d.freeze({"a": 2, "b": 3, "c": 5}) == 20
      expect = [
          x + y + 3 * z for x in [1, 2] for y in [3, 4] for z in [5, 6]
      ]
      assert list(d.grid()) == expect
  
      a = Categorical(["cat", "dog"])
      b = Categorical(["milk", "coffee"])
      assert (a + b).evaluate(["dog", "coffee"]) == "dogcoffee"
      assert (a + 2 * b).evaluate(["cat", "milk"]) == "catmilkmilk"
  
      assert (3 - Categorical([1, 2])).evaluate([1]) == 2
  
      with pytest.raises(TypeError, match=r"^can only concatenate str"):
          (a + Categorical([1, 3])).default()
  
      a = Categorical([1, 17], label="aa")
      a = (abs(-a * 3) % 11) ** 5
      assert "abs" in repr(a)
      with pytest.raises(
          SampleValidationError, match=r"^42 not found in"
      ):
          a.freeze({"aa": 42})
      assert a.evaluate([17]) == 7**5
  
      a = round(7 / Categorical([2, 5]))
      assert a.evaluate([2]) == 4
  
      a = ~(77 ^ (Categorical([1, 4]) & 5))
      assert a.evaluate([4]) == ~(77 ^ (4 & 5))
  
      a = Categorical([5, 3]) * Categorical([6.5, 7.5])
      assert math.floor(a.evaluate([5, 7.5])) == int(5 * 7.5)
  
      a = Categorical([1, 3])
      b = Categorical([2, 4])
      with pytest.raises(
          RuntimeError,
          match=r"^Cannot use bool\(\) on SymbolicExpression",
      ):
          min(a, b)
      with pytest.raises(
          RuntimeError,
          match=r"^Cannot use bool\(\) on SymbolicExpression",
      ):
          if a < b:
              ...
  
      assert MutableExpression.min(a, b).evaluate([3, 2]) == 2
      assert MutableExpression.max(a, b).evaluate([3, 2]) == 3
      assert MutableExpression.max(1, 2, 3) == 3
      assert MutableExpression.max([1, 3, 2]) == 3
  
      assert (
          MutableExpression.condition(
              Categorical([2, 3]) <= 2, "a", "b"
          ).evaluate([3])
          == "b"
      )
      assert (
          MutableExpression.condition(
              Categorical([2, 3]) <= 2, "a", "b"
          ).evaluate([2])
          == "a"
      )
  
      with pytest.raises(RuntimeError):
          assert int(Categorical([2.5, 3.5])).evalute([2.5]) == 2
  
      assert (
          MutableExpression.to_int(Categorical([2.5, 3.5])).evaluate(
              [2.5]
          )
          == 2
      )
      assert (
          MutableExpression.to_float(
              Categorical(["2.5", "3.5"])
          ).evaluate(["3.5"])
          == 3.5
      )
  
imports: import math
  from collections import Counter
  import numpy
  import pytest
  from nni.mutable import *
  from nni.mutable.mutable import _dedup_labeled_mutables, _mutable_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_symbolic_execution() without return types