code: def _extract_features(data_pipeline, samples: List):
      mel_features = [
          _spectrogram_transform(sample[0].squeeze()).transpose(1, 0)
          for sample in samples
      ]
      features = torch.nn.utils.rnn.pad_sequence(
          mel_features, batch_first=True
      )
      features = data_pipeline(features)
      lengths = torch.tensor(
          [elem.shape[0] for elem in mel_features], dtype=torch.int32
      )
      return features, lengths
  
imports: import json
  import math
  from functools import partial
  from typing import List
  import sentencepiece
  import torch
  import torchaudio
  from data_module import LibriSpeechDataModule
  from lightning import Batch
label_desc: Use image node_id 3 for calling a global function with example usage: _extract_features(data_pipeline, samples) and returns: features,  lengths