human
Complete the below
@webapi_decorator
def webapi_check_login_required(view_func):

    ''''A decorator that checks whether login is required on this installation
    and, if so, checks if the user is logged in. If login is required and
    the user is not logged in, they\'ll get a NOT_LOGGED_IN error.'
    '''
assistant
#Here is the Python program you requested.
    @webapi_response_errors(NOT_LOGGED_IN)
    def _check(*args, **kwargs):
        siteconfig = SiteConfiguration.objects.get_current()
        request = _find_httprequest(args)
        if (siteconfig.get(u'auth_require_sitewide_login') or (request.user.is_anonymous() and (u'HTTP_AUTHORIZATION' in request.META))):
            return webapi_login_required(view_func)(*args, **kwargs)
        else:
            return view_func(*args, **kwargs)
    _check.checks_login_required = True
    return _check