def METHOD_NAME(event):
    if event:
        if isinstance(event, Event):
            return event
        try:
            if re.match(r'^\d+$', event):
                return Event.objects.get(id=event)
            else:
                return Event.objects.get(short=event)
        except Event.DoesNotExist:
            raise Http404
    e = Event()
    e.id = None
    e.name = 'All Events'
    return e