code: def get_sparse_embedding(
      config,
      nodeid_slot_holder,
      discrete_slot_holders,
      discrete_slot_lod_holders,
      show_clk,
      use_cvm,
      emb_size,
      name="embedding",
  ):
      """get sparse embedding"""
  
      id_embedding = static.nn.sparse_embedding(
          input=nodeid_slot_holder,
          size=[1024, emb_size + 3],
          param_attr=paddle.ParamAttr(name=name),
      )
  
      id_embedding = static.nn.continuous_value_model(
          id_embedding, show_clk, use_cvm
      )
      id_embedding = id_embedding[
          :, 1:
      ]  # the first column is for lr, remove it
  
      tmp_slot_emb_list = []
      for slot_idx, lod in zip(
          discrete_slot_holders, discrete_slot_lod_holders
      ):
          slot_emb = static.nn.sparse_embedding(
              input=slot_idx,
              size=[1024, emb_size + 3],
              param_attr=paddle.ParamAttr(name=name),
          )
  
          lod = paddle.cast(lod, dtype="int32")
          lod = paddle.reshape(lod, [1, -1])
          lod.stop_gradient = True
          slot_emb = lod_reset(slot_emb, lod)
  
          tmp_slot_emb_list.append(slot_emb)
  
      slot_embedding_list = []
      if len(discrete_slot_holders) > 0:
          slot_bows = F.contrib.layers.fused_seqpool_cvm(
              tmp_slot_emb_list,
              config.slot_pool_type,
              show_clk,
              use_cvm=use_cvm,
          )
          for bow in slot_bows:
              slot_embedding = bow[:, 1:]
              slot_embedding = paddle.nn.functional.softsign(
                  slot_embedding
              )
              slot_embedding_list.append(slot_embedding)
  
      return id_embedding, slot_embedding_list
  
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 10 for calling a global function with example usage: get_sparse_embedding(config, nodeid_slot_holder, discrete_slot_holders, discrete_slot_lod_holders, show_clk, use_cvm, emb_size, name) and returns: id_embedding,  slot_embedding_list