code: def distributed_embedding(
      input,
      dict_size,
      hidden_size,
      initializer,
      name,
      num_part=16,
      is_sparse=False,
      learning_rate=1.0,
  ):
      _part_size = hidden_size // num_part
      if hidden_size % num_part != 0:
          _part_size += 1
      output_embedding = []
      p_num = 0
      while hidden_size > 0:
          _part_size = min(_part_size, hidden_size)
          hidden_size -= _part_size
          print("part", p_num, "size=", (dict_size, _part_size))
          part_embedding = L.embedding(
              input=input,
              size=(dict_size, int(_part_size)),
              is_sparse=is_sparse,
              is_distributed=False,
              param_attr=F.ParamAttr(
                  name=name + "_part%s" % p_num,
                  initializer=initializer,
                  learning_rate=learning_rate,
              ),
          )
          p_num += 1
          output_embedding.append(part_embedding)
      return L.concat(output_embedding, -1)
  
file_path: PGL/legacy/examples/distribute_metapath2vec/model.py
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  import math
  import paddle.fluid.layers
  import paddle.fluid
label_desc: Use image node_id 1 for calling a global function with example usage: distributed_embedding(input, dict_size, hidden_size, initializer, name, num_part, is_sparse, learning_rate) and returns: L