class_docstr: A callback to rewrite repeated scatters with a batched gather.
class_docstr_tok: ["A","callback","to","rewrite","repeated","scatters","with","a","batched","gather","."]
code: def callback(self, pre, post, node_map):
      levels = node_map[self.levels][0]
      roi_align_results = [
          node_map[feat][0] for feat in self.roi_align_results
      ]
      return self.convert_scatter_to_gather(levels, roi_align_results)
  
imports: from ..None import expr
  from ..None import op
  from ..dataflow_pattern import wildcard, is_constant, is_op, rewrite, is_tuple, is_tuple_get_item, is_if, DFPatternCallback
label_desc: Use image node_id 3 for calling the ScatterRewrite obj's underlying member method code with example usage: obj.callback(pre, post, node_map) and returns: self