def __getstate__(self):
        """Handle pickling by removing non-picklable client."""
        state = self.__dict__.copy()
        state.pop("client", None)
        return state
Handle pickling by removing non-picklable client.
pymoo/parallelization/dask.py