<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_object_or_404(queryset, *args, **kwargs):
 """ replacement of rest_framework.generics and django.shrtcuts analogues """

    try:
        return queryset.get(*args, **kwargs)
    except (ValueError, TypeError, DoesNotExist, ValidationError):
        raise Http404()