I came up with a delightful way of solving the following problem on TPUs: suppose *at runtime* you want to read from a *different variable, selected dynamically*.
i.e. you have a list of tf.Variables -- how to index into it?
Solution: build a switch_case for every possibility.