code: def split_wav_lens(
      chunk_lens: List[int], wav_lens: torch.Tensor
  ) -> List[torch.Tensor]:
      """Converts a single `wav_lens` tensor into a list of `chunk_count` tensors,
      typically useful when chunking signals with `split_fixed_chunks`.
  
      `wav_lens` represents the relative length of each audio within a batch,
      which is typically used for masking. This function computes the relative
      length at chunk level.
  
      Arguments
      ---------
      chunk_lens : List[int]
          Length of the sequence of every chunk. For example, if `chunks` was
          returned from `split_fixed_chunks(x, chunk_size, dim=1)`, then this
          should be `[chk.size(1) for chk in chunks]`.
  
      wav_lens : torch.Tensor
          Relative lengths of audio within a batch. For example, for an input
          signal of 100 frames and a batch of 3 elements, `(1.0, 0.5, 0.25)`
          would mean the batch holds audio of 100 frames, 50 frames and 25 frames
          respectively.
  
      Returns
      -------
      List[torch.Tensor]
          A list of chunked wav_lens, see description and example.
  
      Example
      -------
      >>> import torch
      >>> from speechbrain.utils.streaming import split_wav_lens, split_fixed_chunks
      >>> x = torch.zeros((3, 20, 80))
      >>> chunks = split_fixed_chunks(x, 8, dim=1)
      >>> len(chunks)
      3
      >>> # 20 frames, 13 frames, 17 frames
      >>> wav_lens = torch.tensor([1.0, 0.65, 0.85])
      >>> chunked_wav_lens = split_wav_lens([c.size(1) for c in chunks], wav_lens)
      >>> chunked_wav_lens
      [tensor([1., 1., 1.]), tensor([1.0000, 0.6250, 1.0000]), tensor([1.0000, 0.0000, 0.2500])]
      >>> # wav 1 covers 62.5% (5/8) of the second chunk's frames
      """
  
      chunk_wav_lens = []
  
      seq_size = sum(chunk_lens)
      wav_lens_frames = wav_lens * seq_size
  
      chunk_start_frame = 0
      for chunk_len in chunk_lens:
          chunk_raw_len = (
              wav_lens_frames - chunk_start_frame
          ) / chunk_len
          chunk_raw_len = torch.clamp(chunk_raw_len, 0.0, 1.0)
          chunk_wav_lens.append(chunk_raw_len)
  
          chunk_start_frame += chunk_len
  
      return chunk_wav_lens
  
imports: import math
  import torch
  from typing import Callable, List
label_desc: Use image node_id 2 for calling a global function with example usage: split_wav_lens(chunk_lens, wav_lens) and returns: chunk_wav_lens