def cleanup_volumes(self):
        """
        Remove all Docker volumes that were created during the test.

        This function iterates over the set of volumes to clean up and attempts to remove each one using the Docker SDK.
        If a volume cannot be removed, a warning message is logged.
        """

        for volume_name in list(self.volumes_to_cleanup):
            try:
                # Get the volume by name
                volume = self.docker_client.volumes.get(volume_name)

                # Remove the volume
                volume.remove(force=True)
                self.logger.info(f"Successfully removed volume {volume_name}")
                self.volumes_to_cleanup.remove(volume_name)
            except NotFound:
                self.logger.warning(f"Warning: Volume {volume_name} not found. It may already have been removed.")
            except APIError as e:
                self.logger.warning(f"Warning: Failed to remove volume {volume_name}: {e}")

        # Clear any remaining entries in the cleanup set
        self.volumes_to_cleanup.clear()

        Remove all Docker volumes that were created during the test.

        This function iterates over the set of volumes to clean up and attempts to remove each one using the Docker SDK.
        If a volume cannot be removed, a warning message is logged.
        
tests/compatibility_tests/docker_manager.py