def in_obstacle(obstacles, px, py):
    """
    Check if query point is within any of the rectangular obstacles
    :param obstacles: list of rectangular obstacles [(xmin, xmax, ymin, ymax)]
    :param px: query point x coordinate
    :param py: query point y coordinate
    :return:
    """
    for (xmin, xmax, ymin, ymax) in obstacles:
        if xmin <= px <= xmax and ymin <= py <= ymax:
            return True
    return False