code: def _av_info(filepath: tp.Union[str, Path]) -> AudioFileInfo:
      _init_av()
      with av.open(str(filepath)) as af:
          stream = af.streams.audio[0]
          sample_rate = stream.codec_context.sample_rate
          duration = float(stream.duration * stream.time_base)
          channels = stream.channels
          return AudioFileInfo(sample_rate, duration, channels)
  
file_path: audiocraft/audiocraft/data/audio.py
imports: from dataclasses import dataclass
  from pathlib import Path
  import logging
  import typing
  import numpy
  import soundfile
  import torch
  from torch.nn import functional
  import av
  import subprocess
  from .audio_utils import f32_pcm, normalize_audio
label_desc: Use image node_id 2 for calling a global function with example usage: _av_info(filepath) and returns: AudioFileInfo