def patch(self, container: Container, patch: Patch) -> bool:
        """
        Attempts to apply a given patch to the source code for a program inside
        a given container. All patch applications are guaranteed to be atomic;
        if the patch fails to apply, no changes will be made to the relevant
        source code files.

        Returns:
            true if patch application was successful, and false if the attempt
            was unsuccessful.
        """
        path = "containers/{}".format(container.uid)
        payload = str(patch)
        r = self.__api.patch(path, payload)

        return r.status_code == 204