code: def __init__(
      self,
      vocab: List[str],
      embedding_size: int = 50,
      embeddings_trainable: bool = True,
      pretrained_embeddings: Optional[str] = None,
      embeddings_on_cpu: bool = False,
      dropout: float = 0.0,
      embedding_initializer: Optional[Union[str, Dict]] = None,
      encoder_config=None,
      **kwargs,
  ):
      super().__init__()
      self.config = encoder_config
  
      logger.debug(f" {self.name}")
  
      logger.debug("  Embed")
      self.embed = Embed(
          vocab=vocab,
          embedding_size=embedding_size,
          representation="dense",
          embeddings_trainable=embeddings_trainable,
          pretrained_embeddings=pretrained_embeddings,
          embeddings_on_cpu=embeddings_on_cpu,
          dropout=dropout,
          embedding_initializer=embedding_initializer,
      )
      self.embedding_size = self.embed.embedding_size
  
imports: import logging
  from typing import Dict, List, Optional, Type, Union
  import torch
  from torch import nn
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import CATEGORY, ENCODER_OUTPUT
  from ludwig.encoders.base import Encoder
  from ludwig.encoders.registry import register_encoder
  from ludwig.encoders.types import EncoderOutputDict
  from ludwig.modules.embedding_modules import Embed
  from ludwig.schema.encoders.base import BaseEncoderConfig
  from ludwig.schema.encoders.category_encoders import CategoricalEmbedConfig, CategoricalOneHotEncoderConfig, CategoricalPassthroughEncoderConfig, CategoricalSparseConfig
label_desc: Use image node_id 1 to create a new CategoricalEmbedEncoder object from inherited base classes: Encoder with example: obj = CategoricalEmbedEncoder(vocab, embedding_size, embeddings_trainable, pretrained_embeddings, embeddings_on_cpu, dropout, embedding_initializer, encoder_config)