code: def gcn(gw, feature, hidden_size, activation, name, norm=None):
      """Implementation of graph convolutional neural networks (GCN)
  
      This is an implementation of the paper SEMI-SUPERVISED CLASSIFICATION
      WITH GRAPH CONVOLUTIONAL NETWORKS (https://arxiv.org/pdf/1609.02907.pdf).
  
      Args:
          gw: Graph wrapper object (:code:`StaticGraphWrapper` or :code:`GraphWrapper`)
  
          feature: A tensor with shape (num_nodes, feature_size).
  
          hidden_size: The hidden size for gcn.
  
          activation: The activation for the output.
  
          name: Gcn layer names.
  
          norm: If :code:`norm` is not None, then the feature will be normalized. Norm must
                be tensor with shape (num_nodes,) and dtype float32.
  
      Return:
          A tensor with shape (num_nodes, hidden_size)
      """
  
      def send_src_copy(src_feat, dst_feat, edge_feat):
          return src_feat["h"]
  
      size = feature.shape[-1]
      if size > hidden_size:
          feature = L.fc(
              feature,
              size=hidden_size,
              bias_attr=False,
              param_attr=fluid.ParamAttr(name=name),
          )
  
      if norm is not None:
          feature = feature * norm
  
      msg = gw.send(send_src_copy, nfeat_list=[("h", feature)])
  
      if size > hidden_size:
          output = gw.recv(msg, "sum")
      else:
          output = gw.recv(msg, "sum")
          output = L.fc(
              output,
              size=hidden_size,
              bias_attr=False,
              param_attr=fluid.ParamAttr(name=name),
          )
  
      if norm is not None:
          output = output * norm
  
      bias = L.create_parameter(
          shape=[hidden_size],
          dtype="float32",
          is_bias=True,
          name=name + "_bias",
      )
      output = L.elementwise_add(output, bias, act=activation)
      return output
  
file_path: PGL/legacy/pgl/layers/conv.py
imports: import pgl
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils import paddle_helper
  from pgl import message_passing
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: gcn(gw, feature, hidden_size, activation, name, norm) and returns: output, src_feat