class_docstr: GraphFactory
docstr: build graph
docstr_tok: ["build","graph"]
code: def build_graph(self, x_batch):
      """build graph"""
      B, T, n, _ = x_batch.shape
      batch = B * T
  
      batch_edges = []
      for i in range(batch):
          batch_edges.append(self.edges + (i * n))
      batch_edges = np.vstack(batch_edges)
  
      num_nodes = B * T * n
      node_feat = {"norm": np.tile(self.norm, [batch, 1])}
      edge_feat = {"weights": np.tile(self.weights, [batch, 1])}
      graph = Graph(
          num_nodes=num_nodes,
          edges=batch_edges,
          node_feat=node_feat,
          edge_feat=edge_feat,
      )
  
      return graph
  
file_path: PGL/legacy/examples/stgcn/data_loader/graph.py
imports: import sys
  import os
  import numpy
  import pandas
  from pgl.graph import Graph
label_desc: Use image node_id 2 for calling the GraphFactory obj's underlying member method code with example usage: obj.build_graph(x_batch) and returns: graph