code: def test_stacked_shapes():
      agent_counts = {0: 1, 1: 3}
      shapes = {0: dict(a=(1,), b=(1, 2)), 1: dict(c=(1,), d=(2, 2))}
      expected_stacked_shapes = {
          0: dict(a=(1,), b=(1, 2)),
          1: dict(c=(3, 1), d=(3, 2, 2)),
      }
  
      assert expected_stacked_shapes == stacked_shapes(
          shapes, agent_counts
      )
  
imports: from gym import spaces
  from maze.core.utils.structured_env_utils import flat_structured_space, flat_structured_shapes, stacked_shapes
label_desc: Use image node_id 2 for calling a global function with example usage: test_stacked_shapes() without return types