@staticmethod
    def from_valid_json(json_dic, *args):
        log = logging.getLogger("tracker")
        floor_list = args[0]
        floor = next((f for f in floor_list if f.floor_id == json_dic['floor_id']),
                     None)
        if not floor:
            log.error("ERROR: Floor id %s is not found in state list", json_dic['floor_id'])
            return None

        item_id = json_dic['item_id']
        if not Item.contains_info(item_id):
            item_id = "NEW"

        flagstr = json_dic['flags']

        return Item(item_id, floor, flagstr=flagstr)
Create an Item from a type-checked dic and a floor_list
dataset/ETHPy150Open Hyphen-ated/RebirthItemTracker/src/game_objects/item.py/Item.from_valid_json