def sell_items(self, keys, current_time):
        dialogue = ["What would you like to sell?"]
        choices = []
        item_list = []
        for item in self.items:
            if item['type'] in self.player_inventory:
                name = item['type']
                price = " (" + str(item['price'] / 2) + " gold)"
                choices.append(name + price)
                item_list.append(name)
        choices.append('Cancel')
        self.dialogue_box = self.make_dialogue_box(dialogue, 0)
        self.selection_box = self.make_selection_box(choices)

        if len(choices) == 2:
            self.selection_arrow.rect.topleft = self.two_arrow_pos_list[self.arrow_index]
        elif len(choices) == 3:
            self.selection_arrow.rect.topleft = self.arrow_pos_list[self.arrow_index]

        if keys[pg.K_DOWN] and self.allow_input:
            if self.arrow_index < (len(choices) - 1):
                self.arrow_index += 1
                self.allow_input = False
                self.notify(c.CLICK)
        elif keys[pg.K_UP] and self.allow_input:
            if self.arrow_index > 0:
                self.arrow_index -= 1
                self.allow_input = False
                self.notify(c.CLICK)
        elif keys[pg.K_SPACE] and self.allow_input:
            if self.arrow_index == 0:
                self.state = 'confirmsell'
                self.allow_input = False
                for item in self.items:
                    if item['type'] == item_list[0]:
                        self.item_to_be_sold = item

            elif self.arrow_index == 1 and len(choices) == 3:
                self.state = 'confirmsell'
                self.allow_input = False
                for item in self.items:
                    if item['type'] == item_list[1]:
                        self.item_to_be_sold = item
            else:
                self.state = 'buysell'
                self.allow_input = False
            self.arrow_index = 0
            self.notify(c.CLICK2)

        if not keys[pg.K_SPACE] and not keys[pg.K_DOWN] and not keys[pg.K_UP]:
            self.allow_input = True
Serialize a queryset (or any iterator that returns database objects) using
dataset/ETHPy150Open justinmeister/The-Stolen-Crown-RPG/data/shopgui.py/Gui.sell_items--crossover with--dataset/ETHPy150Open django/django/django/core/serializers/__init__.py/serialize