code: def test_masking_no_nodata(tiffs):
      # if the dataset has no defined nodata values, all data is
      # considered valid data. The GDAL masks bands are arrays of
      # 255 values. ``read()`` returns masked arrays where `mask`
      # is False.
      filename = str(tiffs.join("no-nodata.tif"))
      with rasterio.open(filename) as src:
          for flags in src.mask_flag_enums:
              assert MaskFlags.all_valid in flags
              assert MaskFlags.alpha not in flags
              assert MaskFlags.nodata not in flags
  
          rgb = src.read(masked=False)
          assert not hasattr(rgb, "mask")
          r = src.read(1, masked=False)
          assert not hasattr(r, "mask")
  
          rgb = src.read(masked=True)
          assert hasattr(rgb, "mask")
          assert not rgb.mask.any()
          r = src.read(1, masked=True)
          assert hasattr(r, "mask")
          assert not r.mask.any()
  
          rgb = src.read(masked=True)
          assert hasattr(rgb, "mask")
          assert not r.mask.any()
          r = src.read(1, masked=True)
          assert not r.mask.any()
  
          masks = src.read_masks()
          assert masks.all()
  
file_path: rasterio/tests/test_band_masks.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.enums import MaskFlags
  from rasterio.errors import NodataShadowWarning
label_desc: Use image node_id 11 for calling a global function with example usage: test_masking_no_nodata(tiffs) without return types