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