def pprint_blockers(blockers):
    """Pretty print blockers into a sequence of strings.

    Results will be sorted by top-level project name. This means that if a
    project is blocking another project then the dependent project will be
    what is used in the sorting, not the project at the bottom of the
    dependency graph.

    """
    pprinted = []
    for blocker in sorted(blockers, key=lambda x: tuple(reversed(x))):
        buf = [blocker[0]]
        if len(blocker) > 1:
            buf.append(' (which is blocking ')
            buf.append(', which is blocking '.join(blocker[1:]))
            buf.append(')')
        pprinted.append(''.join(buf))
    return pprinted
def pprint_blockers ( blockers ) : pprinted = [ ] for blocker in sorted ( blockers , key = lambda x : tuple ( reversed ( x ) ) ) : buf = [ blocker [ 0 ] ] if len ( blocker ) > 1 : buf . append ( ' (which is blocking ' ) buf . append ( ', which is blocking ' . join ( blocker [ 1 : ] ) ) buf . append ( ')' ) pprinted . append ( '' . join ( buf ) ) return pprinted
Pretty print blockers into a sequence of strings.

    Results will be sorted by top-level project name. This means that if a
    project is blocking another project then the dependent project will be
    what is used in the sorting, not the project at the bottom of the
    dependency graph.