parameters: (self, sents: List[List[str]], device: torch.device)
return_statement: return sents_var
docstring: Convert list of sentences (words) into tensor with necessary padding for
          shorter sentences.
  
          @param sents (List[List[str]]): list of sentences (words)
          @param device: device on which to load the tensor, i.e. CPU or GPU
  
          @returns sents_var: tensor of (max_sentence_length, batch_size, max_word_length)
docstring_summary: Convert list of sentences (words) into tensor with necessary padding for
          shorter sentences.
docstring_tokens: Convert list of sentences ( words ) into tensor with necessary padding for shorter sentences .
function: def to_input_tensor_char(self, sents: List[List[str]], device: torch.device) -> torch.Tensor:
          """ Convert list of sentences (words) into tensor with necessary padding for
          shorter sentences.
  
          @param sents (List[List[str]]): list of sentences (words)
          @param device: device on which to load the tensor, i.e. CPU or GPU
  
          @returns sents_var: tensor of (max_sentence_length, batch_size, max_word_length)
          """
          ### YOUR CODE HERE for part 1e
          ### TODO:
          ###     - Use `words2charindices()` from this file, which converts each character to its corresponding index in the
          ###       character-vocabulary.
          ###     - Use `pad_sents_char()` from utils.py, which pads all words to max_word_length of all words in the batch,
          ###       and pads all sentences to max length of all sentences in the batch. Read __init__ to see how to get
          ###       index of character-padding token
          ###     - Connect these two parts to convert the resulting padded sentences to a torch tensor.
          ### HINT:
          ###     - You may find .contiguous() useful after reshaping. Check the following links for more details:
          ###         https://pytorch.org/docs/stable/tensors.html#torch.Tensor.contiguous
          ###         https://pytorch.org/docs/stable/tensors.html#torch.Tensor.view
  
          char_ids = self.words2charindices(sents) # @return word_ids (list[list[list[int]]]): sentence(s) in indices
  
          # shape (batch_size, max_sentence_length, max_word_length)
          sents_padded = pad_sents_char(char_ids, self.char_pad)
  
          # tensor size (max_sentence_length, batch_size, max_word_length)
          sents_var = torch.tensor(sents_padded, 
                                   dtype=torch.long, 
                                   device=device
                                   ).permute(1,0,2).contiguous()
  
          return sents_var
function_tokens: def to_input_tensor_char ( self , sents : List [ List [ str ] ] , device : torch . device ) -> torch . Tensor : ### YOUR CODE HERE for part 1e ### TODO: ###     - Use `words2charindices()` from this file, which converts each character to its corresponding index in the ###       character-vocabulary. ###     - Use `pad_sents_char()` from utils.py, which pads all words to max_word_length of all words in the batch, ###       and pads all sentences to max length of all sentences in the batch. Read __init__ to see how to get ###       index of character-padding token ###     - Connect these two parts to convert the resulting padded sentences to a torch tensor. ### HINT: ###     - You may find .contiguous() useful after reshaping. Check the following links for more details: ###         https://pytorch.org/docs/stable/tensors.html#torch.Tensor.contiguous ###         https://pytorch.org/docs/stable/tensors.html#torch.Tensor.view char_ids = self . words2charindices ( sents ) # @return word_ids (list[list[list[int]]]): sentence(s) in indices # shape (batch_size, max_sentence_length, max_word_length) sents_padded = pad_sents_char ( char_ids , self . char_pad ) # tensor size (max_sentence_length, batch_size, max_word_length) sents_var = torch . tensor ( sents_padded , dtype = torch . long , device = device ) . permute ( 1 , 0 , 2 ) . contiguous ( ) return sents_var