class_docstr: Implement a graph wrapper that the data of the graph won't
  be changed and it can be fit into the GPU or CPU memory. This
  can reduce the time of swapping large data from GPU and CPU.
  
  Args:
      name: The graph data prefix
  
      graph: The static graph that should be put into memory
  
      place: fluid.CPUPlace or fluid.CUDAPlace(n) indicating the
             device to hold the graph data.
  
  Examples:
  
      If we have a immutable graph and it can be fit into the GPU or CPU.
      we can just use a :code:`StaticGraphWrapper` to pre-place the graph
      data into devices.
  
      .. code-block:: python
  
          import numpy as np
          import paddle.fluid as fluid
          from pgl.graph import Graph
          from pgl.graph_wrapper import StaticGraphWrapper
  
          place = fluid.CPUPlace()
          exe = fluid.Excecutor(place)
  
          num_nodes = 5
          edges = [ (0, 1), (1, 2), (3, 4)]
          feature = np.random.randn(5, 100)
          edge_feature = np.random.randn(3, 100)
          graph = Graph(num_nodes=num_nodes,
                      edges=edges,
                      node_feat={
                          "feature": feature
                      },
                      edge_feat={
                          "edge_feature": edge_feature
                      })
  
          graph_wrapper = StaticGraphWrapper(name="graph",
                      graph=graph,
                      place=place)
  
          # build your deep graph model
  
          # Initialize parameters for deep graph model
          exe.run(fluid.default_startup_program())
  
          # Initialize graph data
          graph_wrapper.initialize(place)
class_docstr_tok: ["Implement","a","graph","wrapper","that","the","data","of","the","graph","won't","be","changed","and","it","can","be","fit","into","the","GPU","or","CPU","memory",".","This","can","reduce","the","time","of","swapping","large","data","from","GPU","and","CPU",".","Args",":","name",":","The","graph","data","prefix","graph",":","The","static","graph","that","should","be","put","into","memory","place",":","fluid.CPUPlace","or","fluid.CUDAPlace","(","n",")","indicating","the","device","to","hold","the","graph","data",".","Examples",":","If","we","have","a","immutable","graph","and","it","can","be","fit","into","the","GPU","or","CPU",".","we","can","just","use","a",":","code",":","`","StaticGraphWrapper","`","to","pre-place","the","graph","data","into","devices",".","..","code-block",":",":","python","import","numpy","as","np","import","paddle.fluid","as","fluid","from","pgl.graph","import","Graph","from","pgl.graph_wrapper","import","StaticGraphWrapper","place","=","fluid.CPUPlace","(",")","exe","=","fluid.Excecutor","(","place",")","num_nodes","=","5","edges","=","[","(","0",",","1",")",",","(","1",",","2",")",",","(","3",",","4",")","]","feature","=","np.random.randn","(","5",",","100",")","edge_feature","=","np.random.randn","(","3",",","100",")","graph","=","Graph","(","num_nodes=num_nodes",",","edges=edges",",","node_feat=","{","``","feature","''",":","feature","}",",","edge_feat=","{","``","edge_feature","''",":","edge_feature","}",")","graph_wrapper","=","StaticGraphWrapper","(","name=","''","graph","''",",","graph=graph",",","place=place",")","#","build","your","deep","graph","model","#","Initialize","parameters","for","deep","graph","model","exe.run","(","fluid.default_startup_program","(",")",")","#","Initialize","graph","data","graph_wrapper.initialize","(","place",")"]
docstr: Convert edge features into paddlepaddle tensor.
          
docstr_tok: ["Convert","edge","features","into","paddlepaddle","tensor","."]
code: def __create_graph_edge_feat(self, edge_feat, collector):
      """Convert edge features into paddlepaddle tensor."""
      for edge_feat_name, edge_feat_value in edge_feat.items():
          edge_feat_shape = edge_feat_value.shape
          edge_feat_dtype = edge_feat_value.dtype
          (
              self.edge_feat_tensor_dict[edge_feat_name],
              init,
          ) = paddle_helper.constant(
              name=self._data_name_prefix
              + "/edge_feat/"
              + edge_feat_name,
              dtype=edge_feat_dtype,
              value=edge_feat_value,
          )
          collector.append(init)
  
imports: import warnings
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils import op
  from pgl.utils import paddle_helper
  from pgl.utils.logger import log
label_desc: Use image node_id 4 for calling the StaticGraphWrapper obj's underlying member method code with example usage: obj.__create_graph_edge_feat(edge_feat, collector) without return types