+ """Unwrap an Optional[Type] argument returning a Type value back.
+ If the Optional[Type] argument is None, however, raise an exception.
+ Use this to satisfy most type checkers that a value that could
+ be None isn't so as to drop the Optional typing hint.
+
+ >>> x: Optional[bool] = True
+ >>> unwrap_optional(x)
+ True
+
+ >>> y: Optional[str] = None
+ >>> unwrap_optional(y)
+ Traceback (most recent call last):
+ ...
+ AssertionError: Argument to unwrap_optional was unexpectedly None
+
+ """