code: def _to_tensor(indices):
      lengths = torch.tensor(
          [len(i) for i in indices], dtype=torch.int32
      )
      values = [torch.tensor(i) for i in indices]
      values = torch.nn.utils.rnn.pad_sequence(values, batch_first=True)
      return values, lengths
  
file_path: audio/src/torchaudio/pipelines/_tts/utils.py
imports: import logging
  import os
  import torch
  from torchaudio._internal import download_url_to_file, module_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _to_tensor(indices) and returns: values,  lengths