How to set nodata when writing TIFF files with Snappy?

Hello everyone, I’m a newer to SNAP. I try to set nodata using Snappy, the results are not as expected.
When looking at the tiff files in QGIS the NoData value is NOT preserved.

def write_to_tiff(product, path):
    print('Writing tiff...')
    incremental = False
    parameters = HashMap()
    parameters.put('noDataValueUsed', True)
    parameters.put('noDataValue', 0.0)
    product = GPF.createProduct('SetNoDataValue', parameters, product)
    snappy.GPF.writeProduct(product, snappy.File(path), 'GeoTIFF-BigTIFF', incremental, snappy.ProgressMonitor.NULL)

The above code is not working, where could the problem be?