def _get_embed(self, embed, vocab_size, embed_size, initializer, dropout, prefix):
if embed is None:<EOL><INDENT>assert embed_size is not None, '<STR_LIT>''<STR_LIT>'<EOL>with self.name_scope():<EOL><INDENT>embed = nn.HybridSequential(prefix=prefix)<EOL>with embed.name_scope():<EOL><INDENT>embed.add(nn.Embedding(input_dim=vocab_size, output_dim=embed_size,<EOL>weight_initializer=initializer))<EOL>if dropout:<EOL><INDENT>embed.add(nn.Dropout(rate=dropout))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>assert isinstance(embed, Block)<EOL>return embed<EOL>
Construct an embedding block.