code: def generate_emb(standalone, model, emb_layer, g, batch_size, device):
      """
      Generate embeddings for each node
      emb_layer : Embedding layer
      g : The entire graph.
      inputs : The features of all the nodes.
      batch_size : Number of nodes to compute at the same time.
      device : The GPU device to evaluate on.
      """
      if not standalone:
          model = model.module
      model.eval()
      emb_layer.eval()
      with th.no_grad():
          inputs = load_embs(standalone, emb_layer, g)
          pred = model.inference(g, inputs, batch_size, device)
      g.barrier()
      return pred
  
file_path: dgl/examples/pytorch/graphsage/dist/train_dist_unsupervised_transductive.py
imports: import argparse
  import time
  import numpy
  import torch
  import torch.nn.functional
  import torch.optim
  import dgl
  from train_dist_transductive import DistEmb, load_embs
  from train_dist_unsupervised import CrossEntropyLoss, DistSAGE, compute_acc
label_desc: Use image node_id 1 for calling a global function with example usage: generate_emb(standalone, model, emb_layer, g, batch_size, device) and returns: pred