docstr: Parameters
  ----------
  index_name: str
      index name
  qlib_dir: str
      qlib directory, by default Path(__file__).resolve().parent.joinpath("qlib_data")
  freq: str
      freq, value from ["day", "1min"]
  request_retry: int
      request retry, by default 5
  retry_sleep: int
      request sleep, by default 3
docstr_tok: ["Parameters","--","--","--","--","--","index_name",":","str","index","name","qlib_dir",":","str","qlib","directory",",","by","default","Path","(","__file__",")",".resolve","(",")",".parent.joinpath","(","``","qlib_data","''",")","freq",":","str","freq",",","value","from","[","``","day","''",",","``","1min","''","]","request_retry",":","int","request","retry",",","by","default","5","retry_sleep",":","int","request","sleep",",","by","default","3"]
code: def __init__(
      self,
      index_name: str,
      qlib_dir: [str, Path] = None,
      freq: str = "day",
      request_retry: int = 5,
      retry_sleep: int = 3,
  ):
      """
  
      Parameters
      ----------
      index_name: str
          index name
      qlib_dir: str
          qlib directory, by default Path(__file__).resolve().parent.joinpath("qlib_data")
      freq: str
          freq, value from ["day", "1min"]
      request_retry: int
          request retry, by default 5
      retry_sleep: int
          request sleep, by default 3
      """
      self.index_name = index_name
      if qlib_dir is None:
          qlib_dir = (
              Path(__file__).resolve().parent.joinpath("qlib_data")
          )
      self.instruments_dir = (
          Path(qlib_dir).expanduser().resolve().joinpath("instruments")
      )
      self.instruments_dir.mkdir(exist_ok=True, parents=True)
      self.cache_dir = (
          Path(f"~/.cache/qlib/index/{self.index_name}")
          .expanduser()
          .resolve()
      )
      self.cache_dir.mkdir(exist_ok=True, parents=True)
      self._request_retry = request_retry
      self._retry_sleep = retry_sleep
      self.freq = freq
  
file_path: qlib/scripts/data_collector/index.py
imports: import sys
  import abc
  from pathlib import Path
  from typing import List
  import pandas
  from tqdm import tqdm
  from loguru import logger
  from data_collector.utils import get_trading_date_by_shift
label_desc: Use image node_id 1 to create a new IndexBase object  with example: obj = IndexBase(index_name, qlib_dir, freq, request_retry, retry_sleep)