FedMeS can be extended to handle non-stationary data distributions by incorporating mechanisms for continual adaptation to changing task distributions. One approach is to introduce a dynamic memory management system that can adjust the memory allocation for each client based on the current task distribution. This would involve periodically reevaluating the relevance of stored samples in memory and updating them accordingly to align with the evolving data distributions. Additionally, the inference process in FedMeS can be enhanced to adapt to new tasks by incorporating online learning techniques that can quickly adjust the model based on incoming data.