def calc_bounds(xy, entity):
    """
    For an entity with width and height attributes, determine
    the bounding box if were positioned at ``(x, y)``.
    """
    left, top = xy
    right, bottom = left + entity.width, top + entity.height
    return [left, top, right, bottom]
For an entity with width and height attributes, determine
    the bounding box if were positioned at ``(x, y)``.