code: def run_on_strategy(replica_fn, strat, coord):
      def distributed_fn():
          return strat.run(replica_fn)
  
      if coord is not None:
          results = coord.schedule(
              def_function.function(distributed_fn)
          ).fetch()
      else:
          results = distributed_fn()
      return results
  
imports: import functools
  import os
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.distribute import sharded_variable
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import values
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.distribute.mirrored_strategy import MirroredStrategy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_combinations
  from tensorflow.python.framework import test_util
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 2 for calling a global function with example usage: run_on_strategy(replica_fn, strat, coord) and returns: results, strat