parameters: (
      shape1, shape2, name="prefer_static_broadcast_shape")
docstring: Convenience function which statically broadcasts shape when possible.
  
    Args:
      shape1:  `1-D` integer `Tensor`.  Already converted to tensor!
      shape2:  `1-D` integer `Tensor`.  Already converted to tensor!
      name:  A string name to prepend to created ops.
  
    Returns:
      The broadcast shape, either as `TensorShape` (if broadcast can be done
        statically), or as a `Tensor`.
docstring_summary: Convenience function which statically broadcasts shape when possible.
docstring_tokens: Convenience function which statically broadcasts shape when possible .
function: def prefer_static_broadcast_shape(
      shape1, shape2, name="prefer_static_broadcast_shape"):
    """Convenience function which statically broadcasts shape when possible.
  
    Args:
      shape1:  `1-D` integer `Tensor`.  Already converted to tensor!
      shape2:  `1-D` integer `Tensor`.  Already converted to tensor!
      name:  A string name to prepend to created ops.
  
    Returns:
      The broadcast shape, either as `TensorShape` (if broadcast can be done
        statically), or as a `Tensor`.
    """
    with ops.name_scope(name, values=[shape1, shape2]):
      if (tensor_util.constant_value(shape1) is not None and
          tensor_util.constant_value(shape2) is not None):
        return array_ops.broadcast_static_shape(
            tensor_shape.TensorShape(tensor_util.constant_value(shape1)),
            tensor_shape.TensorShape(tensor_util.constant_value(shape2)))
      return array_ops.broadcast_dynamic_shape(shape1, shape2)
function_tokens: def prefer_static_broadcast_shape ( shape1 , shape2 , name = "prefer_static_broadcast_shape" ) : with ops . name_scope ( name , values = [ shape1 , shape2 ] ) : if ( tensor_util . constant_value ( shape1 ) is not None and tensor_util . constant_value ( shape2 ) is not None ) : return array_ops . broadcast_static_shape ( tensor_shape . TensorShape ( tensor_util . constant_value ( shape1 ) ) , tensor_shape . TensorShape ( tensor_util . constant_value ( shape2 ) ) ) return array_ops . broadcast_dynamic_shape ( shape1 , shape2 )