<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_permission_logic(model, permission_logic, fail_silently=True):
 """ Remove 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 class or instance A permission logic class or instance which will be used to determine permission of the model fail_silently : boolean If `True` then do not raise KeyError even the specified permission logic have not registered. Examples -------- """

    if not hasattr(model, '_permission_logics'):
        model._permission_logics = set()
    if not isinstance(permission_logic, PermissionLogic):
        # remove all permission logic of related
        remove_set = set()
        for _permission_logic in model._permission_logics:
            if _permission_logic.__class__ == permission_logic:
                remove_set.add(_permission_logic)
        # difference
        model._permission_logics = model._permission_logics.difference(remove_set)
    else:
        if fail_silently and permission_logic not in model._permission_logics:
            pass
        else:
            model._permission_logics.remove(permission_logic)