def _broadcast_shape(*args):
<EOL>shapes = [a.shape if hasattr(type(a), '<STR_LIT>')<EOL>else () for a in args]<EOL>ndim = max(len(sh) for sh in shapes) <EOL>for i, sh in enumerate(shapes):<EOL><INDENT>if len(sh) < ndim:<EOL><INDENT>shapes[i] = (<NUM_LIT:1>,)*(ndim - len(sh)) + sh<EOL><DEDENT><DEDENT>return tuple(max(sh[ax] for sh in shapes) for ax in range(ndim))<EOL>
Return the shape that would result from broadcasting the inputs