class_docstr: Tests for non-member functions in the module xla_sharding.py.
code: def test_copy_sharding_succeeds_with_identically_shaped_tensors(self):
      @def_function.function
      def copy_helper(tensor):
          tensor_src = array_ops.identity(tensor)
          tensor_src = xla_sharding.split(tensor, 2, 3)
          sharding_src = xla_sharding.get_tensor_sharding(tensor_src)
          shape_src = xla_sharding.get_sharding_tile_shape(sharding_src)
          self.assertEqual([1, 1, 3], shape_src)
  
          tensor_dest = array_ops.identity(tensor)
          self.assertIsNone(
              xla_sharding.get_tensor_sharding(tensor_dest)
          )
  
          xla_sharding.copy_sharding(tensor_src, tensor_dest)
          sharding_dest = xla_sharding.get_tensor_sharding(tensor_dest)
          shape_dest = xla_sharding.get_sharding_tile_shape(
              sharding_dest
          )
          self.assertEqual([1, 1, 3], shape_dest)
          return tensor_dest
  
      in_tensor = array_ops.ones([4, 5, 6], dtype=dtypes.float32)
      result = copy_helper(
          array_ops.ones([4, 5, 6], dtype=dtypes.float32)
      )
      self.assertAllEqual(in_tensor, result)
  
imports: from absl.testing import absltest
  import numpy
  from google.protobuf.message import DecodeError
  from local_xla.xla import xla_data_pb2
  from tensorflow.python.compiler.xla.experimental import xla_sharding
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
label_desc: Use image node_id 5 for calling the XlaShardingTest obj's underlying member method code with example usage: obj.test_copy_sharding_succeeds_with_identically_shaped_tensors() and returns: tensor_dest