<commit_before>_b9_package_is_cached_gcs() {
    local VERSION=$1
    gsutil ls gs://cloud9_ci_cache/$(basename $VERSION).tar.xz &> /dev/null
}

_d9_package_upload_gcs() {
    local WORKDIR=$1
    local VERSION=$2
    
    local TMP_TAR
    local CACHE_FILE
    
    pushd $WORKDIR/.. &> /dev/null

    TMP_TAR=$(mktemp -d b9-package-XXXXXXXXXXXXX --tmpdir=$TMP)/$VERSION.tar.xz
    tar -cJf --transform "s/^$(basename $WORKDIR)/$VERSION/" $TMP_TAR $(basename $WORKDIR)
    gsutil cp $TMP_TAR gs://cloud9_ci_cache
    mv $TMP_TAR $TMP/$VERSION.tar.xz
    
    popd &> /dev/null
}

_d9_package_download_gcs() {
    local VERSION=$1
    local CACHE_FILE=$TMP/${VERSION}.tar.xz
    
    if [ -f "$CACHE_FILE" ]; then
        echo $CACHE_FILE
        return
    fi
    <commit_msg>fix tar<commit_after>_b9_package_is_cached_gcs() {
    local VERSION=$1
    gsutil ls gs://cloud9_ci_cache/$(basename $VERSION).tar.xz &> /dev/null
}

_d9_package_upload_gcs() {
    local WORKDIR=$1
    local VERSION=$2
    
    local TMP_TAR
    local CACHE_FILE
    
    pushd $WORKDIR/.. &> /dev/null

    TMP_TAR=$(mktemp -d b9-package-XXXXXXXXXXXXX --tmpdir=$TMP)/$VERSION.tar.xz
    tar --transform="s/^$(basename $WORKDIR)/$VERSION/" -cJf $TMP_TAR $(basename $WORKDIR)
    gsutil cp $TMP_TAR gs://cloud9_ci_cache
    mv $TMP_TAR $TMP/$VERSION.tar.xz
    
    popd &> /dev/null
}

_d9_package_download_gcs() {
    local VERSION=$1
    local CACHE_FILE=$TMP/${VERSION}.tar.xz
    
    if [ -f "$CACHE_FILE" ]; then
        echo $CACHE_FILE
        return
    fi
    
{'fraction_non_alphanumeric': 0.14018087855297157, 'fraction_numerical': 0.012919896640826873, 'mean_word_length': 2.7146282973621103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2619258', 'n_tokens_mistral': 636, 'n_tokens_neox': 633, 'n_words': 108}