code: def test_read_basic(self):
      with rasterio.open("tests/data/shade.tif") as s:
          a = s.read(masked=True)  # Gray
          self.assertEqual(a.ndim, 3)
          self.assertEqual(a.shape, (1, 1024, 1024))
          self.assertTrue(hasattr(a, "mask"))
          self.assertEqual(a.fill_value, 255)
          self.assertEqual(list(set(s.nodatavals)), [255])
          self.assertEqual(a.dtype, rasterio.ubyte)
          self.assertEqual(a.sum((1, 2)).tolist(), [0])
      with rasterio.open("tests/data/RGB.byte.tif") as s:
          a = s.read(masked=True)  # RGB
          self.assertEqual(a.ndim, 3)
          self.assertEqual(a.shape, (3, 718, 791))
          self.assertTrue(hasattr(a, "mask"))
          self.assertEqual(a.fill_value, 0)
          self.assertEqual(list(set(s.nodatavals)), [0])
          self.assertEqual(a.dtype, rasterio.ubyte)
          a = s.read(masked=False)  # no mask
          self.assertFalse(hasattr(a, "mask"))
          self.assertEqual(list(set(s.nodatavals)), [0])
          self.assertEqual(a.dtype, rasterio.ubyte)
      with rasterio.open("tests/data/float.tif") as s:
          a = s.read(masked=True)  # floating point values
          self.assertEqual(a.ndim, 3)
          self.assertEqual(a.shape, (1, 2, 3))
          self.assertTrue(hasattr(a, "mask"))
          self.assertEqual(list(set(s.nodatavals)), [None])
          self.assertEqual(a.dtype, rasterio.float64)
  
imports: from hashlib import md5
  import unittest
  import numpy
  import pytest
  import rasterio
  from rasterio.errors import DatasetIOShapeError
label_desc: Use image node_id 7 for calling the ReaderContextTest obj's underlying member method code with example usage: obj.test_read_basic() without return types