code: def test_get_broadcast_shape():
      x1 = torch.rand(4, 4, 8)
      x2 = torch.rand(1, 8)
      assert get_broadcast_shape(x1.shape, x2.shape) == [4, 4, 8]
  
      x1 = torch.rand(4, 2, 8)
      x2 = torch.rand(2, 8)
      assert get_broadcast_shape(x1.shape, x2.shape) == [4, 2, 8]
  
      x1 = torch.rand(4, 2, 8)
      x2 = torch.rand(8)
      assert get_broadcast_shape(x1.shape, x2.shape) == [4, 2, 8]
  
imports: import torch
  from colossalai.auto_parallel.tensor_shard.utils import get_broadcast_shape, is_broadcastable, recover_sharding_spec_for_broadcast_shape
  from colossalai.device.device_mesh import DeviceMesh
  from colossalai.tensor.sharding_spec import ShardingSpec
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_broadcast_shape() without return types