code: def lod_constant(name, value, lod, dtype):
      """Create constant lod variable with given data,
  
      This function helps to create constants lod variable with given numpy.ndarray data
      and lod information.
  
      Args:
          name: variable name
  
          value: numpy.ndarray the value of constant
  
          dtype: the type of constant
  
          lod: lod infos of given value.
  
      Return:
          A tuple contain the constant variable and the constant
          variable initialize function.
  
      Examples:
          .. code-block:: python
  
              import paddle.fluid as fluid
              place = fluid.CPUPlace()
              exe = fluid.Executor(place)
              constant_var, constant_var_init = lod_constant(name="constant",
                                value=np.array([[5.0], [1.0], [2.0]],
                                lod=[2, 1],
                                dtype="float32"))
              exe.run(fluid.default_startup_program())
              # Run After default startup
              constant_var_init(place)
      """
      data, data_initializer = constant(
          name=name, value=value, dtype=dtype, hide_batch_size=True
      )
  
      _lod = [0]
      for l in lod:
          _lod.append(_lod[-1] + l)
      output = L.lod_reset(data, target_lod=_lod)
      return output, data_initializer
  
file_path: PGL/legacy/pgl/utils/paddle_helper.py
imports: import warnings
  import numpy
  import paddle
  from paddle.fluid import core
  import paddle.fluid
  import paddle.fluid.layer_helper
  import paddle.fluid.layers
  from pgl.utils.logger import log
label_desc: Use image node_id 3 for calling a global function with example usage: lod_constant(name, value, lod, dtype) and returns: output,  data_initializer