code: def validate_and_load_audio(
      audio: Union[str, np.ndarray],
      sample_rate: int = utils.DEFAULT_SAMPLE_RATE,
  ) -> Tuple[np.ndarray, int]:
      """
      If audio is a str, loads the audio as an np.ndarray and returns that & the
      audio's sample rate (returned by librosa.load()). If audio is an np.ndarray,
      just returns the passed in audio & sample_rate.
      """
      if isinstance(audio, str):
          local_path = utils.pathmgr.get_local_path(audio)
          utils.validate_audio_path(local_path)
          return librosa.load(local_path, sr=None, mono=False)
  
      assert isinstance(
          audio, np.ndarray
      ), "Expected type np.ndarray for variable 'audio'"
  
      assert (
          isinstance(sample_rate, int) and sample_rate > 0
      ), "Expected 'sample_rate' to be a positive integer"
  
      return audio, sample_rate
  
file_path: AugLy/augly/audio/utils.py
imports: import numbers
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from augly import utils
  from augly.audio import intensity
  from augly.utils.libsndfile import install_libsndfile
  import librosa
  import soundfile
  import torchaudio
label_desc: Use image node_id 1 for calling a global function with example usage: validate_and_load_audio(audio, sample_rate) and returns: audio,  sample_rate, librosa