class_docstr: YouTube audio Provider based on Youtube DL
code: def get_source(self, path, ext_id=None, ext_uri=None, download=False):
      ydl_opts = {
          "format": "bestaudio",
          "verbose": False,
          "cachedir": False,
          "outtmpl": path + "%(title)s-%(id)s.%(ext)s",
          "postprocessors": [{"key": "FFmpegExtractAudio"}],
          "restrictfilenames": True,
      }
      ref = ext_id or ext_uri
      if not ref:
          raise AttributeError("an external id or uri must be given")
      with youtube_dl.YoutubeDL(ydl_opts) as ydl:
          try:
              info = ydl.extract_info(ref, download=download)
          except DownloadError:
              raise ProviderError(
                  self.id(), external_id=ext_id, external_uri=ext_uri
              )
          file_path = ydl.prepare_filename(info)
          source_uri = info["formats"][0]["url"]
  
      if download:
          if not os.path.exists(path):
              os.makedirs(path)
          # removing file extension
          file_path = os.path.splitext(file_path)[0]
          # searching for file with same name and replacing extension
          file_name = os.path.relpath(file_path, path)
          for file in os.listdir(path):
              if file_name == os.path.splitext(file)[0]:
                  file_path += os.path.splitext(file)[1]
          return file_path
      else:
          return source_uri
  
file_path: TimeSide/timeside/plugins/provider/youtube.py
imports: from timeside.core import implements, interfacedoc
  from timeside.core.provider import Provider
  from timeside.core.api import IProvider
  from timeside.core.exceptions import ProviderError
  import youtube_dl
  from youtube_dl.utils import DownloadError
  import os
label_desc: Use image node_id 6 for calling the YouTube obj's underlying member method code with example usage: obj.get_source(path, ext_id, ext_uri, download) and returns: file_path, source_uri