code: def collater_frm_label(
      self, targets, audio_size, audio_starts, label_rate, pad
  ):
      assert label_rate > 0
      s2f = label_rate / self.sample_rate
      frm_starts = [int(round(s * s2f)) for s in audio_starts]
      frm_size = int(round(audio_size * s2f))
      if not self.pad_audio:
          rem_size = [len(t) - s for t, s in zip(targets, frm_starts)]
          frm_size = min(frm_size, *rem_size)
      targets = [
          t[s : s + frm_size] for t, s in zip(targets, frm_starts)
      ]
      logger.debug(f"audio_starts={audio_starts}")
      logger.debug(f"frame_starts={frm_starts}")
      logger.debug(f"frame_size={frm_size}")
  
      lengths = torch.LongTensor([len(t) for t in targets])
      ntokens = lengths.sum().item()
      targets = data_utils.collate_tokens(
          targets, pad_idx=pad, left_pad=False
      )
      return targets, lengths, ntokens
  
imports: import itertools
  import logging
  import os
  import sys
  from typing import Any, List, Optional, Union
  import numpy
  import torch
  import torch.nn.functional
  from fairseq.data import data_utils
  from fairseq.data.fairseq_dataset import FairseqDataset
  from fairseq.data.audio.audio_utils import parse_path, read_from_stored_zip
  import io
label_desc: Use image node_id 10 for calling the HubertDataset obj's underlying member method code with example usage: obj.collater_frm_label(targets, audio_size, audio_starts, label_rate, pad) and returns: targets,  lengths,  ntokens