accesses mongodb and return a cart spec stored there

def download_cart(cart_name, env):
    """
    accesses mongodb and return a cart spec stored there
    """
    cart_con = cart_db()
    carts = cart_con[env]

    return carts.find_one({'_id': cart_name})