def code_verifier(n_bytes=<NUM_LIT:64>):
verifier = base64.urlsafe_b64encode(os.urandom(n_bytes)).rstrip(b'<STR_LIT:=>')<EOL>if len(verifier) < <NUM_LIT>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>elif len(verifier) > <NUM_LIT>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>return verifier<EOL><DEDENT>
Generates a 'code_verifier' as described in section 4.1 of RFC 7636.

This is a 'high-entropy cryptographic random string' that will be
impractical for an attacker to guess.

Args:
    n_bytes: integer between 31 and 96, inclusive. default: 64
        number of bytes of entropy to include in verifier.

Returns:
    Bytestring, representing urlsafe base64-encoded random data.