def cleanup_containers(self):
        """
        Remove all containers that were created during the test.

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

        for container_name in list(self.containers_to_cleanup):
            try:
                # Get the container by name
                container = self.docker_client.containers.get(container_name)

                # Remove the container
                container.remove(force=True)
                self.logger.debug(f"Successfully removed container {container_name}")
                self.containers_to_cleanup.remove(container_name)
            except NotFound:
                self.logger.warning(f"Warning: Container {container_name} not found. It may already have been removed.")
            except APIError as e:
                self.logger.warning(f"Warning: Failed to remove container {container_name}: {e}")

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

        Remove all containers that were created during the test.

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