code: def test_strategy_run(self):
      strategy = tf.distribute.MirroredStrategy(["CPU:0", "CPU:1"])
  
      with strategy.scope():
          inputs = layers.Input(shape=[4])
          dense = layers.Dense(2)
          output = dense(inputs)
          model = models.Functional(inputs, output)
  
      self.assertIsInstance(dense.kernel, backend.Variable)
      self.assertIsInstance(
          dense.kernel.value, tf.distribute.DistributedValues
      )
  
      def input_fn(ctx):
          if ctx.replica_id_in_sync_group == 1:
              return tf.ones([8, 4])
          else:
              return tf.zeros([8, 4])
  
      distributed_inputs = (
          strategy.experimental_distribute_values_from_function(
              input_fn
          )
      )
  
      @tf.function
      def run_fn(data):
          return model(data)
  
      result = strategy.run(run_fn, args=(distributed_inputs,))
  
      self.assertIsInstance(
          result, tf.types.experimental.distributed.PerReplica
      )
      self.assertLen(result.values, 2)
      self.assertEqual(result.values[0].shape, [8, 2])
      self.assertEqual(result.values[1].shape, [8, 2])
      self.assertNotAllClose(result.values[0], result.values[1])
      self.assertAllClose(result.values[0], tf.zeros([8, 2]))
  
file_path: keras/keras/backend/tensorflow/distribute_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow.python.eager import context
  from keras import backend
  from keras import layers
  from keras import models
  from keras import testing
  from keras.backend.tensorflow import trainer
label_desc: Use image node_id 3 for calling the DistributeTest obj's underlying member method code with example usage: obj.test_strategy_run() and returns: model, tf, tf