code: def init_var(mesh):
      w_initializer = stateless_random_ops.stateless_random_normal(
          [28 * 28, 16], seed=[0, 1]
      )
      b_initializer = stateless_random_ops.stateless_random_normal(
          [16], seed=[0, 2]
      )
      k_initializer = stateless_random_ops.stateless_random_normal(
          [3, 3, 1, 1], seed=[0, 3]
      )
      n_w = variables.Variable(w_initializer)
      n_b = variables.Variable(b_initializer)
      n_k = variables.Variable(k_initializer)
  
      # Initialize DTensor variables.
      w_initializer_on_mesh = d_api.copy_to_mesh(
          w_initializer, d_layout.Layout.replicated(mesh, rank=2)
      )
      b_initializer_on_mesh = d_api.copy_to_mesh(
          b_initializer, d_layout.Layout.replicated(mesh, rank=1)
      )
      k_initializer_on_mesh = d_api.copy_to_mesh(
          k_initializer, d_layout.Layout.replicated(mesh, rank=4)
      )
      w = d_variable.DVariable(
          d_api.relayout(
              w_initializer_on_mesh,
              d_layout.Layout(["unsharded", _MODEL_DIM], mesh),
          )
      )
      b = d_variable.DVariable(
          d_api.relayout(
              b_initializer_on_mesh, d_layout.Layout([_MODEL_DIM], mesh)
          )
      )
      k = d_variable.DVariable(k_initializer_on_mesh)
      return (n_w, n_b, n_k), (w, b, k)
  
imports: import os
  from absl import flags
  import numpy
  from tensorflow.dtensor.python import accelerator_util
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import d_variable
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python import mesh_util
  from tensorflow.dtensor.python.tests import multi_client_test_util
  from tensorflow.dtensor.python.tests import test_backend_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling a global function with example usage: init_var(mesh) and returns: n_w,  n_b,  n_k,  w,  b,  k