def METHOD_NAME(ssh,localpath,remotepath):
    sftp=ssh.open_sftp()
    excludeExt=['.libspec']
    excludeFiles=['red.xml','output.xml','log.html','.project','report.html']
    #create temp zip file with remote tests in local folder where script is located
    zipArchivePath='remote-tests.zip'
    sys.__stdout__.write('compress local repo to  zip file:' + zipArchivePath + '\n')
    zipf = zipfile.ZipFile(zipArchivePath, 'w', zipfile.ZIP_DEFLATED,allowZip64 = True)
    for root, directories, filenames in os.walk(localpath):
        for filename in filenames:
            if not filename.endswith(tuple(excludeExt)) and filename not in excludeFiles:
                root = root.replace('\\', '/')
                relativepath = root.replace(localpath, '')+'/'
                zipf.write(localpath+relativepath+filename,relativepath+filename)
    zipf.close()
    mkdir_p(sftp, remotepath)
    sys.__stdout__.write('Copying zip file to:' + remotepath + '\n')
    sys.stdout.flush()
    sftp.put(zipArchivePath,remotepath+'remote-tests.zip')
    sftp.close()