def METHOD_NAME(self) -> None:
    if self._closed:
        if self._opened:
            raise PoolClosed(f"the pool {self.name!r} is already closed")
        else:
            raise PoolClosed(f"the pool {self.name!r} is not open yet")