code: def test_nodata(tmpdir):
      dst_path = str(tmpdir.join("lol.tif"))
      with rasterio.open("tests/data/RGB.byte.tif") as src:
          with rasterio.open(dst_path, "w", **src.meta) as dst:
              assert dst.nodata == 0.0
              assert dst.meta["nodata"] == 0.0
              assert dst.nodatavals == (0.0, 0.0, 0.0)
      info = subprocess.check_output(["gdalinfo", dst_path])
      pattern = b"Band 1.*?NoData Value=0"
      assert re.search(pattern, info, re.DOTALL) is not None
      pattern = b"Band 2.*?NoData Value=0"
      assert re.search(pattern, info, re.DOTALL) is not None
      pattern = b"Band 2.*?NoData Value=0"
      assert re.search(pattern, info, re.DOTALL) is not None
  
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 1 for calling a global function with example usage: test_nodata(tmpdir) without return types