code: def prepare_batched_graph(dgl_graph):
      # Use node degree as the initial node feature. For undirected graphs,
      # the in-degree is the same as the out_degree.
      node_feat = dgl_graph.in_degrees().view(-1, 1).float()
      dgl_graph.ndata["node_feat"] = node_feat
      g_list = dgl.unbatch(dgl_graph)
      bg = to_batch([from_dgl(g) for g in g_list])
      return bg
  
file_path: graph4nlp/graph4nlp/pytorch/test/graph_classification/run_graph_classification.py
imports: import argparse
  import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from dgl.data import MiniGCDataset
  from torch.utils.data import DataLoader
  from ...data.data import from_dgl, to_batch
  from ...modules.graph_embedding_learning.gat import GAT
  from ...modules.prediction.classification.graph_classification import FeedForwardNN
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_batched_graph(dgl_graph) and returns: bg