code: def get_degree(edge, num_nodes):
      init_output = L.fill_constant(
          shape=[num_nodes], value=0, dtype="float32"
      )
      init_output.stop_gradient = True
      final_output = L.scatter(
          init_output,
          edge,
          L.full_like(edge, 1, dtype="float32"),
          overwrite=False,
      )
      return final_output
  
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 3 for calling a global function with example usage: get_degree(edge, num_nodes) and returns: final_output