def METHOD_NAME(graph, groups, OpType=None, POpType=None):
  def __is_valid_parent(node):
    if len(graph.children(node)) > 1 or node.op.is_custom_op:
      return False
    if POpType is None:
      return True
    elif node.op.type == POpType:
      return True
    return False
  for n in graph.all_nodes():
    if not n.in_quant_part or n.blocks:
      continue
    if NndctOption.nndct_stat.value > 2:
      print('node name: {} parent number: {}'.format(n.name, len(graph.parents(n.name))))
    if groups[n.name][0] == n.name and n.op.type == OpType and \
        len(graph.parents(n.name)) == 1 and __is_valid_parent(graph.parents(n.name)[0]):
      start_node = groups[graph.parents(n.name)[0].name][0]
      groups = glue_group_members(graph, groups, start_node, n.name)
      if NndctOption.nndct_stat.value > 2:
        print('---- Grouping node %s and %s' % (start_node, n.name))
  return groups