<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_slot_positions(self, type='a'):
 """Returns a list with the slots occupied for the type passed in. Allowed type of analyses are: 'a' (routine analysis) 'b' (blank analysis) 'c' (control) 'd' (duplicate) 'all' (all analyses) :param type: type of the analysis :return: list of slot positions """

        if type not in ALLOWED_ANALYSES_TYPES and type != ALL_ANALYSES_TYPES:
            return list()

        layout = self.getLayout()
        slots = list()

        for pos in layout:
            if type != ALL_ANALYSES_TYPES and pos['type'] != type:
                continue
            slots.append(to_int(pos['position']))

        # return a unique list of sorted slot positions
        return sorted(set(slots))