code: def _incr_exceptions(self, conn):
          
          self._pool_manager.get_connection(self.pid, conn).exceptions += 1
docs: Increment the number of exceptions for the current connection.
  
          :param psycopg2.extensions.connection conn: the psycopg2 connection