def __init__(self, slide, machine, x=None, y=None, h_pos=None,
                     v_pos=None, layer=0, **kwargs):

        super(CharacterPicker, self).__init__(slide, x, y, h_pos, v_pos, layer)

        self.fonts = machine.display.fonts
        self.slide = slide
        self.machine = machine
        self.layer = layer
        self.config = deepcopy(kwargs)
        self.char_list = deque()
        self.cursor_position = 0
        self.selected_char = ''
        self.registered_event_handlers = list()

        if 'selected_char_color' not in self.config:
            self.config['selected_char_color'] = 0

        if 'selected_char_bg' not in self.config:
            self.config['selected_char_bg'] = 15

        if 'char_width' not in self.config:
            self.config['char_width'] = 11

        if 'width' not in self.config:
            self.config['width'] = None

        if 'height' not in self.config:
            self.config['height'] = 15

        if 'char_x_offset' not in self.config:
            self.config['char_x_offset'] = 0

        if 'char_y_offset' not in self.config:
            self.config['char_y_offset'] = 0

        if 'shift_left_tag' not in self.config:
            self.config['shift_left_tag'] = 'left_flipper'

        if 'shift_right_tag' not in self.config:
            self.config['shift_right_tag'] = 'right_flipper'

        if 'select_tag' not in self.config:
            self.config['select_tag'] = 'start'

        if 'name' in self.config:
            self.name = self.config['name']
        else:
            self.name = 'character_picker'

        if 'char_list' not in self.config:
            self.config['char_list'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

        if 'max_chars' not in self.config:
            self.config['max_chars'] = 3

        if 'timeout' not in self.config:
            self.config['timeout'] = None
        else:
            self.config['timeout'] = (
                Timing.string_to_secs(self.config['timeout']))

        if 'back_char' not in self.config:
            self.config['back_char'] = 'back_arrow_7x7'

        if 'end_char' not in self.config:
            self.config['end_char'] = 'end_11x7'

        if 'back_char_selected' not in self.config:
            self.config['back_char_selected'] = 'back_arrow_7x7_selected'

        if 'end_char_selected' not in self.config:
            self.config['end_char_selected'] = 'end_11x7_selected'

        if 'image_padding' not in self.config:
            self.config['image_padding'] = 1

        if 'return_param' not in self.config:
            self.config['return_param'] = 'award'

        self.config['selected_char_color'] = (
            self.adjust_color(self.config['selected_char_color']))
        self.config['selected_char_bg'] = (
            self.adjust_color(self.config['selected_char_bg']))

        self.adjust_colors(**self.config)

        self.config['color'] = self.adjusted_color
        self.config['bg_color'] = self.adjusted_bg_color

        self.char_list.extend(self.config['char_list'])
        self.char_list.append('back')
        self.char_list.append('end')
        self.char_list.rotate(2/len(self.char_list))

        self.cursor_position = len(self.char_list)/2
        self.selected_char = self.char_list[self.cursor_position]

        self.machine._set_machine_var(name=self.name + '_chars_entered',
                                      value='')

        self.setup_switch_handlers()

        self.render()
dataset/ETHPy150Open missionpinball/mpf/mpf/media_controller/elements/character_picker.py/CharacterPicker.__init__/swapped operands of `/`