We're dropping 3.9 support on our Python samples, which means we get to upgrade lots of syntax, like:
Optional[X] → X | None
Union[X, Y] → X | Y

Thanks to the "UP" option in ruff for finding everything that can be upgraded!