code: def test_notifies_received_on_poll(self):
      self.autocommit(self.conn)
      self.listen("foo")
  
      proc = self.notify("foo", 1)
  
      t0 = time.time()
      select.select([self.conn], [], [], 5)
      t1 = time.time()
      self.assert_(0.99 < t1 - t0 < 4, t1 - t0)
  
      pid = int(proc.communicate()[0])
      self.assertEqual(0, len(self.conn.notifies))
      self.assertEqual(extensions.POLL_OK, self.conn.poll())
      self.assertEqual(1, len(self.conn.notifies))
      self.assertEqual(pid, self.conn.notifies[0][0])
      self.assertEqual("foo", self.conn.notifies[0][1])
  
imports: import unittest
  from collections import deque
  import psycopg2
  from psycopg2 import extensions
  from psycopg2.extensions import Notify
  from .testutils import ConnectingTestCase, skip_if_crdb, slow
  from .testconfig import dsn
  import sys
  import time
  import select
  from subprocess import Popen, PIPE
label_desc: Use image node_id 4 for calling the NotifiesTests obj's underlying member method code with example usage: obj.test_notifies_received_on_poll() without return types