code: def test_grid():
      lst = MutableList(
          [
              Categorical([1, 2, 3]),
              Numerical(4, 6, label="z"),
              Numerical(4, 6, log_distributed=True),
              Numerical(mu=0, sigma=1),
              Numerical(4, 6, label="z"),
          ]
      )
  
      assert len(list(lst.grid())) == 3
  
      x = Categorical([1, 2, 3], label="x")
      y = Categorical([4, 5, 6], label="y")
      exp = x + y
      assert len(list(ExpressionConstraint(exp == 7).grid())) == 3
      assert len(list(ExpressionConstraint(exp == 10).grid())) == 0
  
      assert list(
          MutableDict(
              {"c": ExpressionConstraint(exp == 7), "a": x, "b": y}
          ).grid()
      ) == [
          {"c": None, "a": 1, "b": 6},
          {"c": None, "a": 2, "b": 5},
          {"c": None, "a": 3, "b": 4},
      ]
  
      lst = MutableList([1, 2, 3])
      assert list(lst.grid()) == [[1, 2, 3]]
  
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 14 for calling a global function with example usage: test_grid() without return types