code: def get_tpu_strategy():
      """Returns a single-core TPUStrategy."""
      global _tpu_strategy
      if _tpu_strategy is not None:
          return _tpu_strategy
  
      resolver = tpu_cluster_resolver.TPUClusterResolver(tpu="")
      remote.connect_to_cluster(resolver)
      topology = tpu_cluster_resolver.initialize_tpu_system(resolver)
      device_assignment = device_assignment_lib.DeviceAssignment.build(
          topology, num_replicas=1
      )
      strategy = tpu_strategy.TPUStrategyV2(
          resolver, experimental_device_assignment=device_assignment
      )
      _tpu_strategy = strategy
      return strategy
  
imports: from absl.testing import parameterized
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import d_variable
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python import numpy_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.dtensor.python.tests import test_util_ops
  from tensorflow.python.distribute import tpu_strategy
  from tensorflow.python.distribute.cluster_resolver.tpu import tpu_cluster_resolver
  from tensorflow.python.eager import remote
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import gen_bitwise_ops
  from tensorflow.python.ops import gen_stateful_random_ops
  from tensorflow.python.ops import gen_stateless_random_ops_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import device_assignment
label_desc: Use image node_id 3 for calling a global function with example usage: get_tpu_strategy() and returns: strategy, _tpu_strategy