<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_enable(target, enable=True, advice_ids=None):
 """Enable or disable all target Advices designated by input advice_ids. If advice_ids is None, apply (dis|en)able state to all advices. """


        advices = get_advices(target)

        for advice in advices:
            try:
                if isinstance(Advice) \
                        and (advice_ids is None or advice.uuid in advice_ids):
                    advice.enable = enable
            except ValueError:
                pass