code: def test_iter_named_cursor_rownumber(self):
      curs = self.conn.cursor("tmp")
      # note: this fails if itersize < dataset: internally we check
      # rownumber == rowcount to detect when to read anoter page, so we
      # would need an extra attribute to have a monotonic rownumber.
      curs.itersize = 20
      curs.execute("select generate_series(1,10)")
      for i, rec in enumerate(curs):
          self.assertEqual(i + 1, curs.rownumber)
  
imports: import gc
  import sys
  import time
  import ctypes
  import pickle
  import psycopg2
  import psycopg2.extensions
  import unittest
  from datetime import date
  from decimal import Decimal
  from weakref import ref
  from .testutils import ConnectingTestCase, skip_before_postgres, skip_if_no_getrefcount, slow, skip_if_no_superuser, skip_if_windows, skip_if_crdb, crdb_version
  import psycopg2.extras
label_desc: Use image node_id 11 for calling the NamedCursorTests obj's underlying member method code with example usage: obj.test_iter_named_cursor_rownumber() without return types