code: def distribute_tensor(tensor, layout):
      """Change the layout of a Tensor value in the jit function execution.
  
      Args:
          tensor: a Tensor to change the layout.
          layout: `TensorLayout` to be applied on the value.
  
      Returns:
          a new value with the specified tensor layout.
      """
      if isinstance(tensor, KerasTensor):
          # keras tensor is only used for building functional model, and can't be
          # used to alter layout/sharding.
          return tensor
      return distribution_lib.distribute_tensor(tensor, layout)
  
imports: import collections
  import contextlib
  import os
  import re
  import warnings
  import numpy
  from keras.api_export import keras_export
  from keras.backend import KerasTensor
  from keras.backend import distribution_lib
  from keras.backend.common import global_state
label_desc: Use image node_id 3 for calling a global function with example usage: distribute_tensor(tensor, layout) and returns: distribution_lib, tensor