docstr: Returns result of applying `self.operation`
  to a contiguous subsequence of the array.
  
      self.operation(arr[start], operation(arr[start+1], operation(... arr[end])))
  
  :param start: (int) beginning of the subsequence
  :param end: (int) end of the subsequences
  :return: (Any) result of reducing self.operation over the specified range of array elements.
docstr_tok: ["Returns","result","of","applying","`","self.operation","`","to","a","contiguous","subsequence","of","the","array",".","self.operation","(","arr","[","start","]",",","operation","(","arr","[","start+1","]",",","operation","(","...","arr","[","end","]",")",")",")",":","param","start",":","(","int",")","beginning","of","the","subsequence",":","param","end",":","(","int",")","end","of","the","subsequences",":","return",":","(","Any",")","result","of","reducing","self.operation","over","the","specified","range","of","array","elements","."]
code: def reduce(self, start=0, end=None):
      """
      Returns result of applying `self.operation`
      to a contiguous subsequence of the array.
  
          self.operation(arr[start], operation(arr[start+1], operation(... arr[end])))
  
      :param start: (int) beginning of the subsequence
      :param end: (int) end of the subsequences
      :return: (Any) result of reducing self.operation over the specified range of array elements.
      """
      if end is None:
          end = self._capacity
      if end < 0:
          end += self._capacity
      end -= 1
      return self._reduce_helper(start, end, 1, 0, self._capacity - 1)
  
file_path: stable-baselines/stable_baselines/common/segment_tree.py
imports: import numpy
label_desc: Use image node_id 3 for calling the SegmentTree obj's underlying member method code with example usage: obj.reduce(start, end) and returns: self