code: def setup_dai_docs(path=None, dst="working_dir_docs", from_hf=False):
      """
      Only supported if have access to source code or HF token for HF spaces and from_hf=True
      :param path:
      :param dst:
      :param from_hf:
      :return:
      """
  
      home = os.path.expanduser("~")
  
      if from_hf:
          # assumes
          from huggingface_hub import hf_hub_download
  
          # True for case when locally already logged in with correct token, so don't have to set key
          token = os.getenv("HUGGING_FACE_HUB_TOKEN", True)
          path_to_zip_file = hf_hub_download(
              "h2oai/dai_docs",
              "dai_docs.zip",
              token=token,
              repo_type="dataset",
          )
          path = "h2oai"
          import zipfile
  
          with zipfile.ZipFile(path_to_zip_file, "r") as zip_ref:
              zip_ref.extractall(path)
          path = os.path.join(path, "docs/**/*")
  
      if path is None:
          if os.path.isdir(os.path.join(home, "h2oai")):
              path = os.path.join(home, "h2oai/docs/**/*")
          else:
              assert os.path.isdir(
                  os.path.join(home, "h2oai.superclean")
              ), ("%s does not exist" % path)
              path = os.path.join(home, "h2oai.superclean/docs/**/*")
      import glob
  
      files = list(glob.glob(path, recursive=True))
  
      # pandoc can't find include files
  
      remove(dst)
      os.makedirs(dst)
  
      # copy full tree, for absolute paths in rst
      for fil in files:
          if os.path.isfile(fil):
              shutil.copy(fil, dst)
  
      # hack for relative path
      scorers_dir = os.path.join(dst, "scorers")
      makedirs(scorers_dir)
      for fil in glob.glob(os.path.join(dst, "*.frag")):
          shutil.copy(fil, scorers_dir)
  
      return dst
  
imports: import ast
  import concurrent.futures
  import contextlib
  import hashlib
  import json
  import os
  import shutil
  import signal
  import sys
  import traceback
  from concurrent.futures import ProcessPoolExecutor
  import psutil
  import pytest
  import pandas
  import numpy
  from tqdm import tqdm
  from utils import flatten_list, remove
  from joblib import Parallel, delayed, effective_n_jobs
  from sklearn.utils import gen_even_slices
  from sklearn.utils.validation import _num_samples
label_desc: Use image node_id 5 for calling a global function with example usage: setup_dai_docs(path, dst, from_hf) and returns: dst