def METHOD_NAME(text):
    import gzip
    with gzip.open('test_data.gz', 'wb') as f:
        f.write(text)
    with open('test_data.gz', 'rb') as f:
        gzip_compress = f.read()
    return gzip_compress