<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def index(request):
 """ Listing page for event `Occurrence`s. :param request: Django request object. :param is_preview: Should the listing page be generated as a preview? This will allow preview specific actions to be done in the template such as turning off tracking options or adding links to the admin. :return: TemplateResponse """

    warnings.warn(
        "icekit_events.views.index is deprecated and will disappear in a "
        "future version. If you need this code, copy it into your project."
        , DeprecationWarning
    )

    occurrences = models.Occurrence.objects.visible()
    context = {
        'occurrences': occurrences,
    }
    return TemplateResponse(request, 'icekit_events/index.html', context)