code: def setUp(self):
      super().setUp()
      if self.primary_device != "TPU":
          # `TpuReplicator` cannot be constructed without a TPU, however it has
          # exactly the same API as `Replicator` so we can run doctests using that
          # instead.
          snt.distribute.TpuReplicator = snt.distribute.Replicator
  
file_path: sonnet/sonnet/src/conformance/doctest_test.py
imports: import doctest
  import inspect
  from absl.testing import parameterized
  import sonnet
  from sonnet.src import test_utils
  import tensorflow
  import tree
label_desc: Use image node_id 1 for calling the DoctestTest obj's underlying member method code with example usage: obj.setUp() without return types