<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_init(target: "EncryptableMixin", args, kwargs):
 """ Intercept SQLAlchemy's instance init event. SQLALchemy allows callback to intercept ORM instance init functions. The calling arguments will be an empty instance of the `target` model, plus the arguments passed to `__init__`. The `kwargs` dictionary is mutable (which is why it is not passed as `**kwargs`). We leverage this callback to conditionally remove the `__plaintext__` value and set the `ciphertext` property. """

    encryptor = target.__encryptor__

    # encryption context may be nullable
    try:
        encryption_context_key = str(kwargs[target.__encryption_context_key__])
    except KeyError:
        return

    # do not encrypt targets that are not configured for it
    if encryption_context_key not in encryptor:
        return

    plaintext = target.plaintext_to_str(kwargs.pop(target.__plaintext__))

    # do not try to encrypt when plaintext is None
    if plaintext is None:
        return

    ciphertext, key_ids = encryptor.encrypt(encryption_context_key, plaintext)
    target.ciphertext = (ciphertext, key_ids)