@classmethod<EOL><INDENT>def random(cls, length):<EOL><DEDENT>
alphabet = list(itervalues(AsciiTrytesCodec.alphabet))<EOL>generator = SystemRandom()<EOL>return cls(<EOL>'<STR_LIT>'.join(<EOL>chr(generator.choice(alphabet)) for _ in range(length)<EOL>).encode('<STR_LIT:ascii>')<EOL>)<EOL>
Generates a random sequence of trytes.

:param length:
    Number of trytes to generate.