code: def generate_emb(model, g, inputs, batch_size, device):
      """
      Generate embeddings for each node
      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.
      """
      model.eval()
      with th.no_grad():
          pred = model.inference(g, inputs, batch_size, device)
  
      return pred
  
imports: import argparse
  import time
  from contextlib import contextmanager
  import numpy
  import sklearn.linear_model
  import sklearn.metrics
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import tqdm
  import dgl
  import dgl.function
  import dgl.nn.pytorch
label_desc: Use image node_id 2 for calling a global function with example usage: generate_emb(model, g, inputs, batch_size, device) and returns: pred