code: def generate_webdata(
      path, c_name="webgear", overwrite_default=False, logging=False
  ):
      """
      ## generate_webdata
  
      Auto-Generates, and Auto-validates default data for WebGear and WebGear_RTC APIs.
  
      Parameters:
          path (string): path for generating data
          c_name (string): class name that is generating files
          overwrite_default (boolean): overwrite existing data or not?
          logging (bool): enables logging for its operations
  
      **Returns:** A valid data path as string.
      """
      # check if path corresponds to vidgear only
      if os.path.basename(path) != ".vidgear":
          path = os.path.join(path, ".vidgear")
  
      # generate parent directory
      path = os.path.join(path, c_name)
      mkdir_safe(path, logging=logging)
  
      # self-generate dirs
      template_dir = os.path.join(
          path, "templates"
      )  # generates HTML templates dir
      static_dir = os.path.join(path, "static")  # generates static dir
      # generate js & css static and favicon img subdirs
      js_static_dir = os.path.join(static_dir, "js")
      css_static_dir = os.path.join(static_dir, "css")
      favicon_dir = os.path.join(static_dir, "img")
  
      mkdir_safe(static_dir, logging=logging)
      mkdir_safe(template_dir, logging=logging)
      mkdir_safe(js_static_dir, logging=logging)
      mkdir_safe(css_static_dir, logging=logging)
      mkdir_safe(favicon_dir, logging=logging)
  
      # check if overwriting is enabled
      if overwrite_default or not validate_webdata(
          template_dir, ["index.html", "404.html", "500.html"]
      ):
          logger.critical(
              "Overwriting existing {} data-files with default data-files from the server!".format(
                  c_name.capitalize()
              )
              if overwrite_default
              else "Failed to detect critical {} data-files: index.html, 404.html & 500.html!".format(
                  c_name.capitalize()
              )
          )
          # download default files
          logging and logger.info(
              "Downloading default data-files from the Gitlab Server: {}".format(
                  "https://gitlab.com/abhiTronix/vidgear-vitals"
              )
          )
          download_webdata(
              template_dir,
              c_name=c_name,
              files=["index.html", "404.html", "500.html", "base.html"],
              logging=logging,
          )
          download_webdata(
              css_static_dir,
              c_name=c_name,
              files=["custom.css"],
              logging=logging,
          )
          download_webdata(
              js_static_dir,
              c_name=c_name,
              files=["custom.js"],
              logging=logging,
          )
          download_webdata(
              favicon_dir,
              c_name=c_name,
              files=["favicon-32x32.png"],
              logging=logging,
          )
      else:
          # validate important data-files
          if logging:
              logger.debug(
                  "Found valid WebGear data-files successfully."
              )
  
      return 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 2 for calling a global function with example usage: generate_webdata(path, c_name, overwrite_default, logging) and returns: path