human
Write me a the Python code you requested given the following:
Complete the below
def download_unsigned(request, uuid, **kwargs):

    ''''Download the unsigned archive for a given extension/version.
    Only reviewers and developers can do this.'
    '''
assistant
#Here is the Python code you requested.
    extension = get_object_or_404(Extension.objects.without_deleted(), uuid=uuid)
    version = get_object_or_404(extension.versions.without_deleted(), pk=kwargs['version_id'])
    def is_author():
        return extension.authors.filter(pk=request.user.pk).exists()
    def is_reviewer():
        return action_allowed(request, 'ContentTools', 'AddonReview')
    if (request.user.is_authenticated() and (is_author() or is_reviewer())):
        log.info(('Downloading    unsigned    add-on:    %s    version    %s    from    %s' % (extension.pk, version.pk, version.file_path)))
        return _download(request, extension, version, version.file_path, public=False)
    else:
        raise PermissionDenied