docs: def occurrence(request, event_id, occurrence_id):
      """
      :param request: Django request object.
      :param event_id: The `id` associated with the occurrence's event.
      :param occurrence_id: The `id` associated with the occurrence.
      :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
      """
      # If this is a preview make sure the user has appropriate permissions.
      warnings.warn(
          "icekit_events.views.occurrence is deprecated and will disappear in a "
          "future version. If you need this code, copy it into your project."
          , DeprecationWarning
      )
  
      try:
          occurrence = models.Occurrence.objects \
              .filter(event_id=event_id, id=occurrence_id) \
              .visible()[0]
      except IndexError:
          raise Http404
  
      context = {
          'occurrence': occurrence,
      }
      return TemplateResponse(
          request,   'icekit_events/occurrence.html', context)