Captures content written to standard error.
        :param callable: the callable to wrap
        :param args: positional arguments passed to the callable
        :param kwargs: keyword arguments passed to the callable
        :return: the captured result

def _capture_stderr(callable: Callable[..., CaptureResult], *args, **kwargs) -> CaptureResult:
        """
        Captures content written to standard error.
        :param callable: the callable to wrap
        :param args: positional arguments passed to the callable
        :param kwargs: keyword arguments passed to the callable
        :return: the captured result
        """
        stream = StringIO()
        with redirect_stderr(stream):
            return_value = callable(*args, **kwargs)
        assert return_value.stderr is None, "stderr appears to have already been captured"
        return CaptureResult(return_value=return_value.return_value, stdout=return_value.stdout,
                             stderr=stream.getvalue(), exception=return_value.exception)