code: def _create_capture_exceptions(capture_decider: Callable[[BaseException], bool]) -> Callable:
          
          def wrapped(*args, **kwargs):
              result = CaptureWrapBuilder._capture_exceptions(*args, **kwargs)
              if result.exception is not None:
                  if not capture_decider(result.exception):
                      raise result.exception
              return result
  
          return wrapped
docs: Creates exception capturer using given capture decider.
          :param capture_decider: given the exception as the first arguments, decides whether it should be captured or
          not (and hence raised)
          :return: