code: def download_webdata(path, c_name="webgear", files=[], logging=False):
      """
      ## download_webdata
  
      Downloads given list of files for WebGear and WebGear_RTC APIs(if not available) from GitHub/Gitlab Servers,
      and also Validates them.
  
      Parameters:
          path (string): path for downloading data
          c_name (string): class name that is generating files
          files (list): list of files to be downloaded
          logging (bool): enables logging for its operations
  
      **Returns:** A valid path as string.
      """
      basename = os.path.basename(path)
      if logging:
          logger.debug(
              "Downloading {} data-files at `{}`".format(basename, path)
          )
  
      # list all registered urls
      reg_urls = [
          "https://gitlab.com/abhiTronix/vidgear-vitals/-/raw/main",
          "https://raw.githubusercontent.com/abhiTronix/vidgear-vitals/main",
      ]
  
      # create session
      with requests.Session() as http:
          for url in reg_urls:
              try:
                  for file in files:
                      # get filename
                      file_name = os.path.join(path, file)
                      # get URL
                      file_url = "{}/{}{}/{}/{}".format(
                          url,
                          c_name,
                          "/static" if basename != "templates" else "",
                          basename,
                          file,
                      )
                      # download and write file to the given path
                      logging and logger.debug(
                          "Downloading {} data-file: {}.".format(
                              basename, file
                          )
                      )
  
                      with open(file_name, "wb") as f:
                          # setup retry strategy
                          retries = Retry(
                              total=3,
                              backoff_factor=1,
                              status_forcelist=[
                                  429,
                                  500,
                                  502,
                                  503,
                                  504,
                              ],
                          )
                          # Mount it for https usage
                          adapter = TimeoutHTTPAdapter(
                              timeout=2.0, max_retries=retries
                          )
                          http.mount("https://", adapter)
                          response = http.get(file_url, stream=True)
                          response.raise_for_status()
                          total_length = (
                              response.headers.get("content-length")
                              if "content-length" in response.headers
                              else len(response.content)
                          )
                          assert not (
                              total_length is None
                          ), "[Helper:ERROR] :: Failed to retrieve files, check your Internet connectivity!"
                          bar = tqdm(
                              total=int(total_length),
                              unit="B",
                              unit_scale=True,
                          )
                          for data in response.iter_content(
                              chunk_size=256
                          ):
                              f.write(data)
                              if len(data) > 0:
                                  bar.update(len(data))
                          bar.close()
              except AssertionError as e:
                  # raise if connection error
                  raise e
              except Exception as e:
                  # log error
                  logger.exception(str(e))
                  # log event if necessary
                  url != reg_urls[1] and logger.error(
                      "Download failed for Gitlab Server! Retrying from GitHub Server: {}".format(
                          url,
                          "https://github.com/abhiTronix/vidgear-vitals",
                      )
                  )
              else:
                  # break otherwise
                  break
  
      if logging:
          logger.debug("Verifying downloaded data:")
      if validate_webdata(path, files=files, logging=logging):
          if logging:
              logger.info("Successful!")
          return path
      else:
          raise RuntimeError(
              "[Helper:ERROR] :: Failed to download required {} data-files at: {}, Check your Internet connectivity!".format(
                  basename, path
              )
          )
  
file_path: vidgear/vidgear/gears/asyncio/helper.py
imports: import os
  import cv2
  import requests
  import numpy
  import logging
  from tqdm import tqdm
  from colorlog import ColoredFormatter
  from requests.adapters import HTTPAdapter
  from requests.packages.urllib3.util.retry import Retry
  from ..helper import logger_handler, mkdir_safe
label_desc: Use image node_id 3 for calling a global function with example usage: download_webdata(path, c_name, files, logging) and returns: path