def compute_zoom_level(bounds, domain, levels):
area_fraction = min(bounds.area/domain.area, <NUM_LIT:1>)<EOL>return int(min(round(np.log2(<NUM_LIT:1>/area_fraction)), levels))<EOL>
Computes a zoom level given a bounds polygon, a polygon of the
overall domain and the number of zoom levels to divide the data
into.

Parameters
----------
bounds: shapely.geometry.Polygon
    Polygon representing the area of the current viewport
domain: shapely.geometry.Polygon
    Polygon representing the overall bounding region of the data
levels: int
    Number of zoom levels to divide the domain into

Returns
-------
zoom_level: int
    Integer zoom level