def get_sections_url(request):
    """
    A fixture that returns URL for two different section endpoints:
    - /v1/hearing/<hearing id>/sections/
    - /v1/section/?hearing=<hearing id>
    """
    return {
        'nested': lambda hearing: '/v1/hearing/%s/sections/' % hearing.id,
        'root': lambda hearing: '/v1/section/?hearing=%s' % hearing.id
    }[request.param]