code: def convert_audio(
      wav: torch.Tensor,
      from_rate: float,
      to_rate: float,
      to_channels: int,
  ) -> torch.Tensor:
      """Convert audio to new sample rate and number of audio channels."""
      wav = julius.resample_frac(wav, int(from_rate), int(to_rate))
      wav = convert_audio_channels(wav, to_channels)
      return wav
  
file_path: audiocraft/audiocraft/data/audio_utils.py
imports: import sys
  import typing
  import julius
  import torch
  import torchaudio
label_desc: Use image node_id 2 for calling a global function with example usage: convert_audio(wav, from_rate, to_rate, to_channels) and returns: wav