code: def test_no_notgeoref_warning(transform, gcps, rpcs):
      with rasterio.MemoryFile() as mem:
          with mem.open(
              driver="GTiff",
              width=10,
              height=10,
              dtype="uint8",
              count=1,
              transform=transform,
          ) as src:
              if gcps:
                  src.gcps = (gcps, rasterio.crs.CRS.from_epsg(4326))
              if rpcs:
                  src.rpcs = rpcs
  
          with pytest.warns(None) as record:
              with mem.open() as dst:
                  pass
  
          assert len(record) == 0
  
file_path: rasterio/tests/test_warnings.py
imports: import rasterio
  from rasterio.errors import NodataShadowWarning, NotGeoreferencedWarning
  from affine import Affine
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_no_notgeoref_warning(transform, gcps, rpcs) without return types