class_docstr: Embedding layer for featureless heterograph.
  Parameters
  ----------
  dev_id : int
      Device to run the layer.
  g : DistGraph
      training graph
  embed_size : int
      Output embed size
  sparse_emb: bool
      Whether to use sparse embedding
      Default: False
  dgl_sparse_emb: bool
      Whether to use DGL sparse embedding
      Default: False
  embed_name : str, optional
      Embed name
class_docstr_tok: ["Embedding","layer","for","featureless","heterograph",".","Parameters","--","--","--","--","--","dev_id",":","int","Device","to","run","the","layer",".","g",":","DistGraph","training","graph","embed_size",":","int","Output","embed","size","sparse_emb",":","bool","Whether","to","use","sparse","embedding","Default",":","False","dgl_sparse_emb",":","bool","Whether","to","use","DGL","sparse","embedding","Default",":","False","embed_name",":","str",",","optional","Embed","name"]
code: def __init__(
      self,
      dev_id,
      g,
      embed_size,
      sparse_emb=False,
      dgl_sparse_emb=False,
      feat_name="feat",
      embed_name="node_emb",
  ):
      super(DistEmbedLayer, self).__init__()
      self.dev_id = dev_id
      self.embed_size = embed_size
      self.embed_name = embed_name
      self.feat_name = feat_name
      self.sparse_emb = sparse_emb
      self.g = g
      self.ntype_id_map = {
          g.get_ntype_id(ntype): ntype for ntype in g.ntypes
      }
  
      self.node_projs = nn.ModuleDict()
      for ntype in g.ntypes:
          if feat_name in g.nodes[ntype].data:
              self.node_projs[ntype] = nn.Linear(
                  g.nodes[ntype].data[feat_name].shape[1], embed_size
              )
              nn.init.xavier_uniform_(self.node_projs[ntype].weight)
              print("node {} has data {}".format(ntype, feat_name))
      if sparse_emb:
          if dgl_sparse_emb:
              self.node_embeds = {}
              for ntype in g.ntypes:
                  # We only create embeddings for nodes without node features.
                  if feat_name not in g.nodes[ntype].data:
                      part_policy = g.get_node_partition_policy(ntype)
                      self.node_embeds[
                          ntype
                      ] = dgl.distributed.DistEmbedding(
                          g.num_nodes(ntype),
                          self.embed_size,
                          embed_name + "_" + ntype,
                          init_emb,
                          part_policy,
                      )
          else:
              self.node_embeds = nn.ModuleDict()
              for ntype in g.ntypes:
                  # We only create embeddings for nodes without node features.
                  if feat_name not in g.nodes[ntype].data:
                      self.node_embeds[ntype] = th.nn.Embedding(
                          g.num_nodes(ntype),
                          self.embed_size,
                          sparse=self.sparse_emb,
                      )
                      nn.init.uniform_(
                          self.node_embeds[ntype].weight, -1.0, 1.0
                      )
      else:
          self.node_embeds = nn.ModuleDict()
          for ntype in g.ntypes:
              # We only create embeddings for nodes without node features.
              if feat_name not in g.nodes[ntype].data:
                  self.node_embeds[ntype] = th.nn.Embedding(
                      g.num_nodes(ntype), self.embed_size
                  )
                  nn.init.uniform_(
                      self.node_embeds[ntype].weight, -1.0, 1.0
                  )
  
imports: import argparse
  import gc, os
  import itertools
  import time
  import numpy
  from functools import partial
  import dgl
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  import tqdm
  from dgl import DGLGraph, nn
  from dgl.distributed import DistDataLoader
  from ogb.nodeproppred import DglNodePropPredDataset
  from torch.multiprocessing import Queue
  from torch.nn.parallel import DistributedDataParallel
  from torch.utils.data import DataLoader
label_desc: Use image node_id 1 to create a new DistEmbedLayer object from inherited base classes: nn with example: obj = DistEmbedLayer(dev_id, g, embed_size, sparse_emb, dgl_sparse_emb, feat_name, embed_name)