def METHOD_NAME(
    cls,
    key: str,
    value: str,
    user_id: int,
) -> SecretModel:
    value = cls._encrypt(value)
    secret_model = SecretModel(key=key, value=value, user_id=user_id)
    db.session.add(secret_model)
    try:
        db.session.commit()
    except Exception as e:
        raise ApiError(
            error_code="create_secret_error",
            message=(
                f"There was an error creating a secret with key: {key} and value"
                f" ending with: {value[:-4]}. Original error is {e}"
            ),
        ) from e
    return secret_model