def METHOD_NAME(node, grand_total, offset, args):
    self_count = int(node.attrib['self_count'])
    if len(node) == 1 and check_cutoff(self_count, grand_total, args):
        if args.skip == 'none':
            skip = False
        elif args.skip == 'unranked':
            rank = node.attrib.get('rank')
            skip = rank is None
        elif args.skip == 'all':
            skip = True
        else:
            assert False
        if skip:
            for subnode in sorted_children(node):
                yield METHOD_NAME(subnode, grand_total, offset, args)
            return
    name = node.attrib['name']
    total_count = int(node.attrib['total_count'])
    if check_cutoff(total_count, grand_total, args):
        return
    rate = float(total_count) / grand_total
    percent = rate*100
    if args.no_padding:
        percent_precision = '.%s' % args.precision
        hits_precision = ''
    else:
        percent_precision = '%s.%s' % (args.precision + 3, args.precision)
        hits_precision = str(len(str(grand_total)))
    pattern = '%s%s\t%' + percent_precision + 'f%%  (%' + hits_precision + 'd hits)'
    yield pattern % (offset, name, percent, total_count)
    for subnode in sorted_children(node):
        yield METHOD_NAME(subnode, grand_total, offset+args.indent, args)