def prettyPrintPattern(self, bits, verbosity=<NUM_LIT:1>):
numberMap = self.numberMapForBits(bits)<EOL>text = "<STR_LIT>"<EOL>numberList = []<EOL>numberItems = sorted(iter(numberMap.items()),<EOL>key=lambda number_bits: len(number_bits[<NUM_LIT:1>]),<EOL>reverse=True)<EOL>for number, bits in numberItems:<EOL><INDENT>if verbosity > <NUM_LIT:2>:<EOL><INDENT>strBits = [str(n) for n in bits]<EOL>numberText = "<STR_LIT>".format(number, "<STR_LIT:U+002C>".join(strBits))<EOL><DEDENT>elif verbosity > <NUM_LIT:1>:<EOL><INDENT>numberText = "<STR_LIT>".format(number, len(bits))<EOL><DEDENT>else:<EOL><INDENT>numberText = str(number)<EOL><DEDENT>numberList.append(numberText)<EOL><DEDENT>text += "<STR_LIT>".format("<STR_LIT:U+002CU+0020>".join(numberList))<EOL>return text<EOL>
Pretty print a pattern.

@param bits      (set) Indices of on bits
@param verbosity (int) Verbosity level

@return (string) Pretty-printed text