code: def generate_key(block_size=32):
          
          random_seq = os.urandom(block_size)
          random_key = base64.b64encode(random_seq)
          return random_key
docs: Generate random key for ope cipher.
  
          Parameters
          ----------
          block_size : int, optional
              Length of random bytes.
  
          Returns
          -------
          random_key : str
              A random key for encryption.
  
          Notes:
          ------
          Implementation follows https://github.com/pyca/cryptography