src/transformers/benchmark/benchmark_args_tf.py/TensorFlowBenchmarkArguments/_setup_tpu
class TensorFlowBenchmarkArguments:    def _setup_tpu(self) -> Tuple["tf.distribute.cluster_resolver.TPUClusterResolver"]:
        requires_backends(self, ["tf"])
        tpu = None
        if self.tpu:
            try:
                if self.tpu_name:
                    tpu = tf.distribute.cluster_resolver.TPUClusterResolver(self.tpu_name)
                else:
                    tpu = tf.distribute.cluster_resolver.TPUClusterResolver()
            except ValueError:
                tpu = None
        return tpu