code: def test_set_nan_nodata(tmpdir):
      dst_path = str(tmpdir.join("lol.tif"))
      with rasterio.open("tests/data/RGB.byte.tif") as src:
          meta = src.meta
          meta["dtype"] = "float32"
          meta["nodata"] = float("nan")
          with rasterio.open(dst_path, "w", **meta) as dst:
              assert numpy.isnan(dst.nodata)
              assert numpy.isnan(dst.meta["nodata"])
              assert numpy.isnan(dst.nodatavals).all()
  
file_path: rasterio/tests/test_nodata.py
imports: import logging
  import pytest
  import re
  import subprocess
  import sys
  import numpy
  import rasterio
  from rasterio.io import MemoryFile
label_desc: Use image node_id 6 for calling a global function with example usage: test_set_nan_nodata(tmpdir) without return types