parameters: (self, **kwargs)
return_statement: return context
docstring: Pass the task_id back to the template if one is given.
          :param kwargs:
docstring_summary: Pass the task_id back to the template if one is given.
          :param kwargs:
docstring_tokens: Pass the task_id back to the template if one is given . : param kwargs :
function: def get_context_data(self, **kwargs):
          """Pass the task_id back to the template if one is given.
          :param kwargs:
          """
  
          context = super().get_context_data(**kwargs)
  
          context['search'] = None
          if 'search_id' in kwargs and kwargs['search_id'] is not None:
              try:
                  search = SearchInfo.objects.get(id=kwargs['search_id'])
              except SearchInfo.DoesNotExist:
                  raise Http404
          else:
              now = pytz.UTC.localize(datetime.datetime.utcnow())
              search = SearchInfo(start=now-datetime.timedelta(hours=1),
                                  end=now,
                                  proto=0)
  
          context['search'] = search
  
          context['search_protos'] = settings.SEARCH_TRANSPORT_PROTOS.items()
  
          return context
function_tokens: def get_context_data ( self , * * kwargs ) : context = super ( ) . get_context_data ( * * kwargs ) context [ 'search' ] = None if 'search_id' in kwargs and kwargs [ 'search_id' ] is not None : try : search = SearchInfo . objects . get ( id = kwargs [ 'search_id' ] ) except SearchInfo . DoesNotExist : raise Http404 else : now = pytz . UTC . localize ( datetime . datetime . utcnow ( ) ) search = SearchInfo ( start = now - datetime . timedelta ( hours = 1 ) , end = now , proto = 0 ) context [ 'search' ] = search context [ 'search_protos' ] = settings . SEARCH_TRANSPORT_PROTOS . items ( ) return context