code: def unshare(self, con):
          
          self._lock.acquire()
          try:
              con.unshare()
              shared = con.shared
              if not shared:  # connection is idle,
                  try:  # so try to remove it
                      self._shared_cache.remove(con)  # from shared cache
                  except ValueError:
                      pass  # pool has already been closed
          finally:
              self._lock.release()
          if not shared:  # connection has become idle,
              self.cache(con.con)
docs: Decrease the share of a connection in the shared cache.