def get_free_area(space_region, obstacle_map):
    """
    Return the total free area in space region, accounting for obstacles.

    Args:
        space_region: tuple of form (origin_x, origin_y), (range_x, range_y)
        obstacle_map: dict of form {id: (x, y), (range_x, range_y)}

    Returns:
        float area
    """
    _, space_range = space_region
    l, b = space_range
    space_area = l * b

    obstacle_area = 0
    for obstacle in obstacle_map.values():
        _, obstacle_range = obstacle
        l, b = obstacle_range
        obstacle_area += l * b

    return space_area - obstacle_area