code: def __init__(self, cfg, name=None):
      super(ErnieEncoderStack, self).__init__()
      n_layers = cfg["num_hidden_layers"]
      self.block = D.LayerList(
          [
              ErnieBlock(cfg, append_name(name, "layer_%d" % i))
              for i in range(n_layers)
          ]
      )
  
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import paddle.fluid.dygraph
  import paddle.fluid
  import paddle.fluid.layers
label_desc: Use image node_id 1 to create a new ErnieEncoderStack object from inherited base class: D with example: obj = ErnieEncoderStack(cfg, name)