code: def copy_to_mesh(
      tensor: Any,
      layout: layout_lib.Layout,
      source_layout: Optional[layout_lib.Layout] = None,
  ) -> tensor_lib.Tensor:
      """Copies a tf.Tensor onto the DTensor device with the given layout.
  
      Copies a regular tf.Tensor onto the DTensor device. Use the mesh attached to
      `layout` as target mesh. This method currently only supports replicated
      layouts, or one-to-one copies for sharded layouts.
  
      Args:
        tensor: A regular tf.Tensor to be copied as a DTensor.
        layout: Target layout (and mesh) for the result DTensor.
        source_layout: Source layout of the tensor before copy. This argument
          is deprecated.
  
      Returns:
        A DTensor on the DTensor device with the given layout.
      """
      del source_layout
      return relayout(tensor, layout)
  
imports: import contextlib
  import threading
  from typing import Any, Callable, Optional, Sequence
  from tensorflow.dtensor.python import dtensor_device
  from tensorflow.dtensor.python import gen_dtensor_ops
  from tensorflow.dtensor.python import layout
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 7 for calling a global function with example usage: copy_to_mesh(tensor, layout, source_layout) and returns: relayout