def _random_token(self, bits=<NUM_LIT>):
alphabet = string.ascii_letters + string.digits + '<STR_LIT>'<EOL>num_letters = int(math.ceil(bits / <NUM_LIT>))<EOL>return '<STR_LIT>'.join(random.choice(alphabet) for i in range(num_letters))<EOL>
Generates a random token, using the url-safe base64 alphabet.
The "bits" argument specifies the bits of randomness to use.