<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_to_cog(source_file, destination_file, resampling=rasterio.enums.Resampling.gauss, blocksize=256, overview_blocksize=256, creation_options=None):
 """Convert source file to a Cloud Optimized GeoTiff new file. :param source_file: path to the original raster :param destination_file: path to the new raster :param resampling: which Resampling to use on reading, default Resampling.gauss :param blocksize: the size of the blocks default 256 :param overview_blocksize: the block size of the overviews, default 256 :param creation_options: <dictioanry>, options that can override the source raster profile, notice that you can't override tiled=True, and the blocksize """


    with rasterio.open(source_file) as src:
        # creation_options overrides proile
        source_profile = src.profile
    creation_options = _creation_options_for_cog(creation_options, source_profile, blocksize)

    with rasterio.Env(GDAL_TIFF_INTERNAL_MASK=True, GDAL_TIFF_OVR_BLOCKSIZE=overview_blocksize):
        with TemporaryDirectory() as temp_dir:
            temp_file = os.path.join(temp_dir, 'temp.tif')
            rasterio_sh.copy(source_file, temp_file, **creation_options)
            with rasterio.open(temp_file, 'r+') as dest:
                factors = _calc_overviews_factors(dest)
                dest.build_overviews(factors, resampling=resampling)
                dest.update_tags(ns='rio_overview', resampling=resampling.name)

                telluric_tags = _get_telluric_tags(source_file)
                if telluric_tags:
                    dest.update_tags(**telluric_tags)

            rasterio_sh.copy(temp_file, destination_file,
                             COPY_SRC_OVERVIEWS=True, **creation_options)