<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_permission_logic(model, permission_logic):
 """ Add permission logic to the model Parameters model : django model class A django model class which will be treated by the specified permission logic permission_logic : permission logic instance A permission logic instance which will be used to determine permission of the model Examples -------- """

    if not isinstance(permission_logic, PermissionLogic):
        raise AttributeError(
        '`permission_logic` must be an instance of PermissionLogic')
    if not hasattr(model, '_permission_logics'):
        model._permission_logics = set()
    if not hasattr(model, '_permission_handler'):
        from permission.utils.handlers import registry
        # register default permission handler
        registry.register(model, handler=None)
    model._permission_logics.add(permission_logic)
    # store target model to the permission_logic instance
    permission_logic.model = model