<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_occupied_slots(instance):
 """ Return a list of slots for which values have been set. (While a slot might be defined, if a value for that slot hasn't been set, then it's an AttributeError to request the slot's value.) """

    return [slot for slot in get_all_slots(type(instance))
            if hasattr(instance,slot)]