docstr: Returns
  -------
  
      pd.DataFrame:
          symbol      date        type
          SH600000  2019-11-11    add
          SH600000  2020-11-10    remove
      dtypes:
          symbol: str
          date: pd.Timestamp
          type: str, value from ["add", "remove"]
docstr_tok: ["Returns","--","--","--","-","pd.DataFrame",":","symbol","date","type","SH600000","2019-11-11","add","SH600000","2020-11-10","remove","dtypes",":","symbol",":","str","date",":","pd.Timestamp","type",":","str",",","value","from","[","``","add","''",",","``","remove","''","]"]
code: def get_history_companies(self) -> pd.DataFrame:
      """
  
      Returns
      -------
  
          pd.DataFrame:
              symbol      date        type
              SH600000  2019-11-11    add
              SH600000  2020-11-10    remove
          dtypes:
              symbol: str
              date: pd.Timestamp
              type: str, value from ["add", "remove"]
      """
      bs.login()
      today = pd.Timestamp.now()
      date_range = pd.DataFrame(
          pd.date_range(start="2007-01-15", end=today, freq="7D")
      )[0].dt.date
      ret_list = []
      col = ["date", "symbol", "code_name"]
      for date in tqdm(date_range, desc="Download CSI500"):
          rs = bs.query_zz500_stocks(date=str(date))
          zz500_stocks = []
          while (rs.error_code == "0") & rs.next():
              zz500_stocks.append(rs.get_row_data())
          result = pd.DataFrame(zz500_stocks, columns=col)
          result["symbol"] = result["symbol"].apply(
              lambda x: x.replace(".", "").upper()
          )
          result = self.get_data_from_baostock(date)
          ret_list.append(result[["date", "symbol"]])
      bs.logout()
      return pd.concat(ret_list, sort=False)
  
imports: import re
  import abc
  import sys
  from io import BytesIO
  from typing import List, Iterable
  from pathlib import Path
  import fire
  import requests
  import pandas
  import baostock
  from tqdm import tqdm
  from loguru import logger
  from data_collector.index import IndexBase
  from data_collector.utils import get_calendar_list, get_trading_date_by_shift, deco_retry
  from data_collector.utils import get_instruments
label_desc: Use image node_id 4 for calling the CSI500Index obj's underlying member method code with example usage: obj.get_history_companies() and returns: pd