def filter_dict_to_mongo_query(filters):
    """Return mongo query from filters dict."""
    base_uri_subquery = None
    if len(filters["base_uris"]) == 1:
        base_uri_subquery = str(filters["base_uris"][0])
    else:
        base_uris = [str(b) for b in filters["base_uris"]]
        base_uri_subquery = {"$in": base_uris}

    return {"base_uri": base_uri_subquery}