'Create the <imageinput> element.
Uses **kwargs:
*src*: URL for the image file [DEFAULT: "/static/image.jpg"]
*width*: Width of the image [DEFAULT: 100]
*height*: Height of the image [DEFAULT: 100]
*rectangle*: String representing the rectangles the user should select.
Take the form "(x1,y1)-(x2,y2)", where the two (x,y)
tuples define the corners of the rectangle.
Can include multiple rectangles separated by a semicolon, e.g.
"(490,11)-(556,98);(242,202)-(296,276)"
*regions*: String representing the regions a user can select
Take the form "[ [[x1,y1], [x2,y2], [x3,y3]],
[[x1,y1], [x2,y2], [x3,y3]] ]"
(Defines two regions, each with 3 points)
REQUIRED: Either *rectangle* or *region* (or both)'

def create_input_element(self, **kwargs):

    src = kwargs.get('src', '/static/image.jpg')
    width = kwargs.get('width', 100)
    height = kwargs.get('height', 100)
    rectangle = kwargs.get('rectangle', None)
    regions = kwargs.get('regions', None)
    assert (rectangle or regions)
    input_element = etree.Element('imageinput')
    input_element.set('src', str(src))
    input_element.set('width', str(width))
    input_element.set('height', str(height))
    if rectangle:
        input_element.set('rectangle', rectangle)
    if regions:
        input_element.set('regions', regions)
    return input_element
