def rectangles_collide(pos1, size1, pos2, size2):
    """
    Return True if the rectangles collide

    Rectangles are supplied in [x,y], [xsize, ysize] form with the left corner
    and size. Assumes positions and sizes to be sorted

    :param pos1: top left corner of the first rectangle, as (x, y) 2-tuple

    :param size1: size of the first rectangle, as (width, height) 2-tuple

    :param pos2: top left corner of the second rectangle, as (x, y) 2-tuple

    :param size2: size of the second rectangle, as (width, height) 2-tuple
    """
    # X overlap
    if pos1[0] <= pos2[0]+size2[0]-1 and pos2[0] <= pos1[0]+size1[0]-1:
        # Y overlap
        if pos1[1] <= pos2[1]+size2[1]-1 and pos2[1] <= pos1[1]+size1[1]-1:
            return True
    return False