code: def embed_batch(self, batch: List[List[str]]) -> List[numpy.ndarray]:
          
          elmo_embeddings = []
  
          # Batches with only an empty sentence will throw an exception inside AllenNLP, so we handle this case
          # and return an empty embedding instead.
          if batch == [[]]:
              elmo_embeddings.append(empty_embedding())
          else:
              embeddings, mask = self.batch_to_embeddings(batch)
              for i in range(len(batch)):
                  length = int(mask[i, :].sum())
                  # Slicing the embedding :0 throws an exception so we need to special case for empty sentences.
                  if length == 0:
                      elmo_embeddings.append(empty_embedding())
                  else:
                      elmo_embeddings.append(embeddings[i, :, :length, :].detach().cpu().numpy())
  
          return elmo_embeddings
docs: Computes the ELMo embeddings for a batch of tokenized sentences.
  
          Please note that ELMo has internal state and will give different results for the same input.
          See the comment under the class definition.
  
          Parameters
          ----------
          batch : ``List[List[str]]``, required
              A list of tokenized sentences.
  
          Returns
          -------
              A list of tensors, each representing the ELMo vectors for the input sentence at the same index.