from tensorflow.python.ops import array_ops

  if (weights_shape.is_fully_defined() and
      values_shape.is_fully_defined() and
      weights_shape.is_compatible_with(values_shape)):
    return weights
  return math_ops.mul(
      weights, array_ops.ones_like(values), name='broadcast_weights')


def streaming_mean(values, weights=None, metrics_collections=None,
                   updates_collections=None, name=None):
