human
Write me a Python program to print info given the following:
I wrote the below code

    if onabort:
        o = options.Options((optspec % spec_prefix), onabort=onabort)
    else:
        o = options.Options((optspec % spec_prefix))
    (opt, flags, extra) = o.parse(args)
    classification = None
    show_hidden = None
    for flag in flags:
        (option, parameter) = flag
        if (option in ('-F', '--classify')):
            classification = 'all'
        elif (option == '--file-type'):
            classification = 'type'
        elif (option in ('-a', '--all')):
            show_hidden = 'all'
        elif (option in ('-A', '--almost-all')):
            show_hidden = 'almost'
    L = []
    def output_node_info(node, name):
        info = node_info(node, name, show_hash=opt.hash, long_fmt=opt.l, classification=classification, numeric_ids=opt.numeric_ids, human_readable=opt.human_readable)
        if ((not opt.l) and istty1):
            L.append(info)
        else:
            print info
    ret = 0
    for path in (extra or [default]):
        try:
            if opt.directory:
                n = pwd.lresolve(path)
            else:
                n = pwd.try_resolve(path)
            if ((not opt.directory) and stat.S_ISDIR(n.mode)):
                if (show_hidden == 'all'):
                    output_node_info(n, '.')
                    if n.parent:
                        output_node_info(n.parent, '..')
                    else:
                        output_node_info(n, '..')
                for sub in n:
                    name = sub.name
                    if ((show_hidden in ('almost', 'all')) or (not (len(name) > 1)) or (not name.startswith('.'))):
                        output_node_info(sub, name)
            else:
                output_node_info(n, os.path.normpath(path))
        except vfs.NodeError as e:
            log(('error:    %s\n' % e))
            ret = 1
    if L:
        sys.stdout.write(columnate(L, ''))
    return ret

What's a good function header?
assistant
#Here is Python program to print info
.

def do_ls(args, pwd, default='.', onabort=None, spec_prefix=''):