code: def build_graph_holder(
      samples, use_degree_norm=False, return_weight=False
  ):
      """build graph holder"""
      holder_list = []
      graph_holders = {}
      for i, s in enumerate(samples):
          # For different sample size, we hold a graph block.
          graph_holders[i] = []
          num_nodes = static.data(
              name="%s_num_nodes" % i, shape=[-1], dtype="int32"
          )
          graph_holders[i].append(num_nodes)
          holder_list.append(num_nodes)
  
          next_num_nodes = static.data(
              name="%s_next_num_nodes" % i, shape=[-1], dtype="int32"
          )
          graph_holders[i].append(next_num_nodes)
          holder_list.append(next_num_nodes)
  
          edges_src = static.data(
              name="%s_edges_src" % i, shape=[-1, 1], dtype="int64"
          )
          graph_holders[i].append(edges_src)
          holder_list.append(edges_src)
  
          edges_dst = static.data(
              name="%s_edges_dst" % i, shape=[-1, 1], dtype="int64"
          )
          graph_holders[i].append(edges_dst)
          holder_list.append(edges_dst)
  
          edges_split = static.data(
              name="%s_edges_split" % i, shape=[-1], dtype="int32"
          )
          graph_holders[i].append(edges_split)
          holder_list.append(edges_split)
  
          if return_weight:
              edges_weight = static.data(
                  name="%s_edges_weight" % i,
                  shape=[-1],
                  dtype="float32",
              )
              graph_holders[i].append(edges_weight)
              holder_list.append(edges_weight)
  
      ego_index_holder = static.data(
          name="final_index", shape=[-1], dtype="int32"
      )
      holder_list.append(ego_index_holder)
  
      if use_degree_norm:
          node_degree_holder = static.data(
              name="node_degree", shape=[-1], dtype="int32"
          )
          holder_list.append(node_degree_holder)
      else:
          node_degree_holder = None
  
      holder_dict = {
          "graph_holders": graph_holders,
          "final_index": ego_index_holder,
          "holder_list": holder_list,
          "node_degree": node_degree_holder,
      }
  
      return holder_dict
  
imports: import os
  import sys
  import math
  import time
  import numpy
  import pickle
  import paddle
  import paddle.fluid
  import paddle.fluid.layers
  import paddle.static
  from paddle.common_ops_import import LayerHelper, check_type, check_variable_and_dtype
  from paddle.fluid.framework import Variable
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 9 for calling a global function with example usage: build_graph_holder(samples, use_degree_norm, return_weight) and returns: holder_dict