code: def test_smart_array_concatenate_broadcast():
      a0 = np.broadcast_to(123, (0,))
      a1 = np.broadcast_to(123, (1,))
      a2 = np.broadcast_to(123, (2,))
      b1 = np.broadcast_to(456, (1,))
      nonbroadcast = np.array([456, 789])
  
      _check_smart_concatenate([a0, a1, a2], should_be_broadcast=True)
      _check_smart_concatenate([a0, b1, a2], should_be_broadcast=False)
      _check_smart_concatenate(
          [a0, nonbroadcast, a2], should_be_broadcast=False
      )
  
      # multidimensional broadcasting isn't handled
      c43 = np.broadcast_to(123, (4, 3))
      c53 = np.broadcast_to(123, (5, 3))
      _check_smart_concatenate([c43, c53], should_be_broadcast=False)
  
      d43 = np.broadcast_to([123, 456, 789], (4, 3))
      d53 = np.broadcast_to([123, 456, 789], (5, 3))
      _check_smart_concatenate([d43, d53], should_be_broadcast=False)
  
      # weird dimensions should have normal errors
      c54 = np.broadcast_to(123, (5, 4))
      with pytest.raises(
          ValueError, match="must match exactly.* size 3 .* size 4"
      ):
          _check_smart_concatenate([c43, c54])
  
      with pytest.raises(
          ValueError,
          match="must have same number.* 1 dimension.* 2 dimension",
      ):
          _check_smart_concatenate([a0, c43])
  
file_path: stellargraph/tests/core/test_utils.py
imports: import pytest
  import numpy
  from stellargraph.core.utils import *
  from ..test_utils import flaky_xfail_mark
  from ..test_utils.graphs import example_graph_random
label_desc: Use image node_id 11 for calling a global function with example usage: test_smart_array_concatenate_broadcast() without return types