def heirarchical_help(shovel, prefix):
    '''Given a shovel of tasks, display a heirarchical list of the tasks'''
    result = []
    tuples = heirarchical_helper(shovel, prefix)
    if not tuples:
        return ''

    # We need to figure out the longest fullname length
    longest = max(len(name + '    ' * level) for name, _, level in tuples)
    fmt = longest % '%%%is => %%-50s'
    for name, docstring, level in tuples:
        if docstring == None:
            result.append('    ' * level + name + '/')
        else:
            docstring = re.sub(r'\s+', ' ', docstring).strip()
            if len(docstring) > 50:
                docstring = docstring[:47] + '...'
            result.append(fmt % (name, docstring))
    return '\n'.join(result)
dataset/ETHPy150Open seomoz/shovel/shovel/help.py/heirarchical_help/swapped operands of `%`