class_docstr: Indicates how a set of values should be reduced.
  
  * `SUM`: Add all the values.
  * `MEAN`: Take the arithmetic mean ("average") of the values.
class_docstr_tok: ["Indicates","how","a","set","of","values","should","be","reduced",".","*","`","SUM","`",":","Add","all","the","values",".","*","`","MEAN","`",":","Take","the","arithmetic","mean","(","``","average","''",")","of","the","values","."]
code: def from_variable_aggregation(aggregation):
      mapping = {
          variable_scope.VariableAggregation.SUM: ReduceOp.SUM,
          variable_scope.VariableAggregation.MEAN: ReduceOp.MEAN,
      }
  
      reduce_op = mapping.get(aggregation)
      if not reduce_op:
          raise ValueError(
              "Could not convert from `tf.VariableAggregation` %s to"
              "`tf.distribute.ReduceOp` type" % aggregation
          )
      return reduce_op
  
imports: import enum
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling the ReduceOp obj's underlying member method code with example usage: obj.from_variable_aggregation(aggregation) and returns: reduce_op