code: def _reduce(node: Node, op: Aggregator) -> None:
      assert node
      left_node, right_node, _ = node
      parent_value = []
      if left_node:
          parent_value.append(left_node[2])
      if right_node:
          parent_value.append(right_node[2])
      if parent_value:
          node[2] = op(parent_value)
      else:
          del node[:]
  
imports: import collections
  from typing import Any, Callable, Deque, Generic, List, Optional, Sequence, Tuple, TypeVar
  import numpy
  from pfrl.utils.random import sample_n_k
label_desc: Use image node_id 2 for calling a global function with example usage: _reduce(node, op) without return types