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

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

        self.slide = slide
        self.shape = shape.lower()

        if 'name' in kwargs:
            self.name = kwargs['name']
        else:
            self.name = 'shape'

        self.adjust_colors(**kwargs)

        if kwargs not in 'thickness':
            kwargs['thickness'] = 1

        if shape == 'box':
            self.box(width=kwargs['width'],
                      height=kwargs['height'],
                      thickness=kwargs['thickness'])

        elif shape == 'line':
            self.line(end_x=kwargs['width'],
                      end_y=kwargs['height'],
                      thickness=kwargs['thickness'])
        else:
            raise Exception("Invalid shape: " + shape)

        # todo change to arg
        self.element_surface.set_colorkey((0, 0, 0))

        self.layer = layer
        self.set_position(x, y, h_pos, v_pos)
dataset/ETHPy150Open missionpinball/mpf/mpf/media_controller/elements/shape.py/Shape.__init__/swapped operands of `not in`