def locate_in_boundary(target, boundary):
    """
    Returns a loc_string location string, indicating where target is with respect to its boundary
    """
    b_top = target.top - boundary.top
    b_bottom = target.bottom - boundary.bottom
    b_left = target.left - boundary.left
    b_right = target.right - boundary.right

    top = b_top <= 0
    bottom = b_bottom >= 0
    left = b_left <= 0
    right = b_right >= 0

    if top and right:
        return "TOP_RIGHT"
    elif top and left:
        return "TOP_LEFT"
    elif bottom and right:
        return "BOTTOM_RIGHT"
    elif bottom and left:
        return "BOTTOM_LEFT"
    elif top:
        return "TOP"
    elif bottom:
        return "BOTTOM"
    elif left:
        return "LEFT"
    elif right:
        return "RIGHT"
    else: 
        return "BOUNDED"