code: def _make_cookie(self):
          
          return struct.pack(self.COOKIE_FMT, self.COOKIE_MAGIC,
                             os.getpid(), id(self), thread.get_ident())
docs: Return a string encoding the ID of the process, instance and thread.
          This disambiguates legitimate wake-ups, accidental writes to the FD,
          and buggy internal FD sharing.