parameters: (shape1, shape2)
return_statement: return tuple(_broadcast_axis(a, b) for a, b in zip(shape1, shape2))
docstring: Raises
      ------
      ValueError if broadcast fails
docstring_summary: Raises
      ------
      ValueError if broadcast fails
docstring_tokens: Raises ------ ValueError if broadcast fails
function: def _pairwise_broadcast(shape1, shape2):
      """
      Raises
      ------
      ValueError if broadcast fails
      """
      shape1, shape2 = map(tuple, [shape1, shape2])
  
      while len(shape1) < len(shape2):
          shape1 = (1,) + shape1
  
      while len(shape1) > len(shape2):
          shape2 = (1,) + shape2
  
      return tuple(_broadcast_axis(a, b) for a, b in zip(shape1, shape2))
function_tokens: def _pairwise_broadcast ( shape1 , shape2 ) : shape1 , shape2 = map ( tuple , [ shape1 , shape2 ] ) while len ( shape1 ) < len ( shape2 ) : shape1 = ( 1 , ) + shape1 while len ( shape1 ) > len ( shape2 ) : shape2 = ( 1 , ) + shape2 return tuple ( _broadcast_axis ( a , b ) for a , b in zip ( shape1 , shape2 ) )