code: def __init__(
      self,
      executemany_mode="values_only",
      executemany_batch_page_size=100,
      **kwargs,
  ):
      _PGDialect_common_psycopg.__init__(self, **kwargs)
  
      if self._native_inet_types:
          raise NotImplementedError(
              "The psycopg2 dialect does not implement "
              "ipaddress type handling; native_inet_types cannot be set "
              "to ``True`` when using this dialect."
          )
  
      # Parse executemany_mode argument, allowing it to be only one of the
      # symbol names
      self.executemany_mode = parse_user_argument_for_enum(
          executemany_mode,
          {
              EXECUTEMANY_VALUES: ["values_only"],
              EXECUTEMANY_VALUES_PLUS_BATCH: ["values_plus_batch"],
          },
          "executemany_mode",
      )
  
      self.executemany_batch_page_size = executemany_batch_page_size
  
      if self.dbapi and hasattr(self.dbapi, "__version__"):
          m = re.match(
              r"(\d+)\.(\d+)(?:\.(\d+))?", self.dbapi.__version__
          )
          if m:
              self.psycopg2_version = tuple(
                  int(x) for x in m.group(1, 2, 3) if x is not None
              )
  
          if self.psycopg2_version < (2, 7):
              raise ImportError(
                  "psycopg2 version 2.7 or higher is required."
              )
  
imports: from __future__ import annotations
  import collections.abc
  import logging
  import re
  from typing import cast
  from .None import ranges
  from ._psycopg_common import _PGDialect_common_psycopg
  from ._psycopg_common import _PGExecutionContext_common_psycopg
  from .base import PGIdentifierPreparer
  from .json import JSON
  from .json import JSONB
  from ...None import types
  from ...None import util
  from ...util import FastIntFlag
  from ...util import parse_user_argument_for_enum
label_desc: Use image node_id 1 to create a new PGDialect_psycopg2 object from inherited base classes: _PGDialect_common_psycopg with example: obj = PGDialect_psycopg2(executemany_mode, executemany_batch_page_size)