def check_target_sub_board(self):
        if self.target_board:
            target_board_id = self.target_board.get_id()
            target_sub_board_ids = self.settings.get(target_board_id, [])

            if self.option_index < len(target_sub_board_ids):
                target_sub_board_id = target_sub_board_ids[self.option_index]
                options = self.target_board.get_options()
                option = options[self.option_index]
                self.target_sub_board = option.get_item(target_sub_board_id)

            if not self.target_sub_board:
                options = self.target_board.get_options()
                option = options[self.option_index]
                sub_boards = option.get_items()
                self.target_sub_board = sub_boards[0]
dataset/ETHPy150Open Robot-Will/Stino/stino/pyarduino/arduino_target_board.py/TargetSubBoardInfo.check_target_sub_board/original