message: TF API Fixit: Remove private usage of is_mirrored in Keras.
diff: from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import collective_all_reduce_strategy
  from tensorflow.python.distribute import combinations as ds_combinations
  -from tensorflow.python.distribute import distribute_utils
  from tensorflow.python.distribute import distribution_strategy_context as ds_context
  from tensorflow.python.distribute import strategy_combinations
  +from tensorflow.python.distribute import values
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import test_combinations as combinations
  +from tensorflow.python.keras.distribute import distributed_training_utils
  from tensorflow.python.keras.layers import core
  from tensorflow.python.platform import test
  @@ -66,6 +67,14 @@ class MirroredVariableCreationTest(test.TestCase):
  continue
  self.assertIsNot(objs[i], objs[j])
  + def _is_mirrored(self, val):
  + if distributed_training_utils.is_distributed_variable(val):
  + if val._policy: # pylint: disable=protected-access
  + return val._policy._is_mirrored() # pylint: disable=protected-access
  + # Since `Mirrored` is a private symbol in tf.distribute, we're checking
  + # with `DistributedValues` as an approximation.
  + return isinstance(val, values.DistributedValues)
  +
  def testWithLayers(self, distribution):
  def model_fn(features):
  @@ -93,9 +102,9 @@ class MirroredVariableCreationTest(test.TestCase):
  result = distribution.extended.call_for_each_replica(
  model_fn, args=(features,))
  for kernel, bias in result:
  - self.assertTrue(distribute_utils.is_mirrored(kernel))
  + self.assertTrue(self._is_mirrored(kernel))
  self.assertAllDifferent(distribution.experimental_local_results(kernel))
  - self.assertTrue(distribute_utils.is_mirrored(bias))
  + self.assertTrue(self._is_mirrored(bias))
  self.assertAllDifferent(distribution.experimental_local_results(kernel))
  