code: def test_record(self):
      records = list(self.reader.records())
      assert len(records) == len(self.reader)
  
      # Choose a nice small lake
      river_record = records[self.river_index]
      expected_attributes = {
          "featurecla": "River",
          "min_label": 3.1,
          "min_zoom": 2.1,
          "name": self.river_name,
          "name_en": self.river_name,
          "scalerank": 2,
      }
      for key, value in river_record.attributes.items():
          if key in expected_attributes:
              assert value == expected_attributes[key]
      assert river_record.geometry == self.test_river_geometry
  
file_path: cartopy/lib/cartopy/tests/test_shapereader.py
imports: from pathlib import Path
  import numpy
  from numpy.testing import assert_array_almost_equal
  import pytest
  import shapely.geometry
  import cartopy.io.shapereader
label_desc: Use image node_id 3 for calling the TestRivers obj's underlying member method code with example usage: obj.test_record() without return types