code: def get_zip_manifest(
      zip_path: Path, zip_root: Optional[Path] = None, is_audio=False
  ):
      _zip_path = Path.joinpath(zip_root or Path(""), zip_path)
      with zipfile.ZipFile(_zip_path, mode="r") as f:
          info = f.infolist()
      paths, lengths = {}, {}
      for i in tqdm(info):
          utt_id = Path(i.filename).stem
          offset, file_size = (
              i.header_offset + 30 + len(i.filename),
              i.file_size,
          )
          paths[utt_id] = f"{zip_path.as_posix()}:{offset}:{file_size}"
          with open(_zip_path, "rb") as f:
              f.seek(offset)
              byte_data = f.read(file_size)
              assert len(byte_data) > 1
              if is_audio:
                  assert is_sf_audio_data(byte_data), i
              else:
                  assert is_npy_data(byte_data), i
              byte_data_fp = io.BytesIO(byte_data)
              if is_audio:
                  lengths[utt_id] = sf.info(byte_data_fp).frames
              else:
                  lengths[utt_id] = np.load(byte_data_fp).shape[0]
      return paths, lengths
  
imports: import csv
  from pathlib import Path
  import zipfile
  from functools import reduce
  from multiprocessing import cpu_count
  from typing import Any, Dict, List, Optional, Union
  import io
  import numpy
  import pandas
  import sentencepiece
  from fairseq.data.audio.audio_utils import convert_waveform, _get_kaldi_fbank, _get_torchaudio_fbank, is_npy_data, is_sf_audio_data
  import torch
  import soundfile
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: get_zip_manifest(zip_path, zip_root, is_audio) and returns: paths,  lengths