def METHOD_NAME(model, msg, logger_args, **kwargs):
    try:
        return model.objects.get(**kwargs)
    except model.DoesNotExist:
        logger.error(msg, *logger_args)
        raise Http404(msg)