code: def dist_embedding_check_sanity(num_nodes, optimizer, name=None):
      local_rank = dgl.distributed.get_rank() % num_client_per_machine
  
      emb = dgl.distributed.DistEmbedding(
          num_nodes, 1, name=name, init_func=zeros_init
      )
      lr = 0.001
      optim = optimizer(params=[emb], lr=lr)
  
      stride = 3
  
      pos = (part_id // 2) * num_client_per_machine + local_rank
      idx = F.arange(pos * stride, (pos + 1) * stride)
  
      if part_id % 2 == 0:
          with F.record_grad():
              value = emb(idx)
              optim.zero_grad()
              loss = F.sum(value + 1, 0)
          loss.backward()
          optim.step()
  
      dgl.distributed.client_barrier()
      value = emb(idx)
      F.allclose(
          value, F.ones((len(idx), 1), dtype=F.int32, ctx=F.cpu()) * -lr
      )
  
      not_update_idx = F.arange(
          ((num_part + 1) / 2) * num_client_per_machine * stride,
          num_nodes,
      )
      value = emb(not_update_idx)
      assert np.all(
          F.asnumpy(value) == np.zeros((len(not_update_idx), 1))
      )
  
imports: import json
  import os
  from itertools import product
  import dgl
  import dgl.backend
  import numpy
  from dgl.distributed import edge_split, load_partition_book, node_split
label_desc: Use image node_id 17 for calling a global function with example usage: dist_embedding_check_sanity(num_nodes, optimizer, name) without return types