human
I wrote the below code

    def pad(text):
        '\n                                Pads    text    to    be    encrypted\n                                '
        pad_length = (blocksize - (len(text) % blocksize))
        sr = random.StrongRandom()
        pad = ''.join((chr(sr.randint(1, 255)) for i in range((pad_length - 1))))
        return ((text + chr(0)) + pad)
    init_vector = Random.get_random_bytes(16)
    cypher = AES.new(key, AES.MODE_CBC, init_vector)
    padded = cypher.encrypt(pad(str(plaintext)))
    return base64.urlsafe_b64encode((init_vector + padded))

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def urlsafe_encrypt(key, plaintext, blocksize=16):