class_docstr: There are more than one way to embed a token and this module provides a way
  to generate a list of sub-embeddings, concat embedding tensors into a single
  Tensor or return a tuple of Tensors that can be used by downstream modules.
  
  Args:
      embeddings (Iterable[EmbeddingBase]): A sequence of embedding modules to
      embed a token.
      concat (bool): Whether to concatenate the embedding vectors emitted from
      `embeddings` modules.
  
  Attributes:
      num_emb_modules (int): Number of flattened embeddings in `embeddings`,
          e.g: ((e1, e2), e3) has 3 in total
      input_start_indices (List[int]): List of indices of the sub-embeddings
          in the embedding list.
      concat (bool): Whether to concatenate the embedding vectors emitted from
          `embeddings` modules.
      embedding_dim: Total embedding size, can be a single int or tuple of
          int depending on concat setting
class_docstr_tok: ["There","are","more","than","one","way","to","embed","a","token","and","this","module","provides","a","way","to","generate","a","list","of","sub-embeddings",",","concat","embedding","tensors","into","a","single","Tensor","or","return","a","tuple","of","Tensors","that","can","be","used","by","downstream","modules",".","Args",":","embeddings","(","Iterable","[","EmbeddingBase","]",")",":","A","sequence","of","embedding","modules","to","embed","a","token",".","concat","(","bool",")",":","Whether","to","concatenate","the","embedding","vectors","emitted","from","`","embeddings","`","modules",".","Attributes",":","num_emb_modules","(","int",")",":","Number","of","flattened","embeddings","in","`","embeddings","`",",","e.g",":","(","(","e1",",","e2",")",",","e3",")","has","3","in","total","input_start_indices","(","List","[","int","]",")",":","List","of","indices","of","the","sub-embeddings","in","the","embedding","list",".","concat","(","bool",")",":","Whether","to","concatenate","the","embedding","vectors","emitted","from","`","embeddings","`","modules",".","embedding_dim",":","Total","embedding","size",",","can","be","a","single","int","or","tuple","of","int","depending","on","concat","setting"]
code: def __init__(
      self, embeddings: Iterable[EmbeddingBase], concat: bool
  ) -> None:
      EmbeddingBase.__init__(self, 0)
      embeddings = list(filter(None, embeddings))
      self.num_emb_modules = sum(
          emb.num_emb_modules for emb in embeddings
      )
      embeddings_list, input_start_indices = [], []
      start = 0
      for emb in embeddings:
          if emb.embedding_dim > 0:
              embeddings_list.append(emb)
              input_start_indices.append(start)
          start += emb.num_emb_modules
      ModuleList.__init__(self, embeddings_list)
      self.input_start_indices = input_start_indices
      self.concat = concat
      assert len(self) > 0, "must have at least 1 sub embedding"
      embedding_dims = tuple(emb.embedding_dim for emb in self)
      self.embedding_dim = (
          sum(embedding_dims) if concat else embedding_dims
      )
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/embeddings/embedding_list.py
imports: from typing import Dict, Iterable, List, Tuple, Union
  import torch
  import torch.nn
  from pytext.utils.usage import log_class_usage
  from torch.nn import ModuleList
  from torch.utils.tensorboard import SummaryWriter
  from .embedding_base import EmbeddingBase
label_desc: Use image node_id 1 to create a new EmbeddingList object from inherited base classes: EmbeddingBase, ModuleList with example: obj = EmbeddingList(embeddings, concat)