class_docstr: Interface for distributed objects that admit iteration/reduction.
class_docstr_tok: ["Interface","for","distributed","objects","that","admit","iteration\/reduction","."]
docstr: Reduces this iterable object to a single element.
  
  The transformation calls `reduce_func` successively on each element.
  The `initial_state` argument is used for the initial state and the final
  state is returned as the result.
  
  Args:
    initial_state: An element representing the initial state of the
      reduction.
    reduce_func: A function that maps `(old_state, input_element)` to
      `new_state`. The structure of `new_state` must match the structure of
      `old_state`. For the first element, `old_state` is `initial_state`.
  
  Returns:
    The final state of the transformation.
docstr_tok: ["Reduces","this","iterable","object","to","a","single","element",".","The","transformation","calls","`","reduce_func","`","successively","on","each","element",".","The","`","initial_state","`","argument","is","used","for","the","initial","state","and","the","final","state","is","returned","as","the","result",".","Args",":","initial_state",":","An","element","representing","the","initial","state","of","the","reduction",".","reduce_func",":","A","function","that","maps","`","(","old_state",",","input_element",")","`","to","`","new_state","`",".","The","structure","of","`","new_state","`","must","match","the","structure","of","`","old_state","`",".","For","the","first","element",",","`","old_state","`","is","`","initial_state","`",".","Returns",":","The","final","state","of","the","transformation","."]
code: def reduce(self, initial_state, reduce_func):
      """Reduces this iterable object to a single element.
  
      The transformation calls `reduce_func` successively on each element.
      The `initial_state` argument is used for the initial state and the final
      state is returned as the result.
  
      Args:
        initial_state: An element representing the initial state of the
          reduction.
        reduce_func: A function that maps `(old_state, input_element)` to
          `new_state`. The structure of `new_state` must match the structure of
          `old_state`. For the first element, `old_state` is `initial_state`.
  
      Returns:
        The final state of the transformation.
      """
  
imports: from tensorflow.python.util.tf_export import tf_export
  from tensorflow.tools.docs import doc_controls
label_desc: Use image node_id 2 for calling the Iterable obj's underlying member method code with example usage: obj.reduce(initial_state, reduce_func) without return types