code: def _dump_bin(
      self,
      file_or_data: [Path, pd.DataFrame],
      calendar_list: List[pd.Timestamp],
  ):
      if not calendar_list:
          logger.warning("calendar_list is empty")
          return
      if isinstance(file_or_data, pd.DataFrame):
          if file_or_data.empty:
              return
          code = fname_to_code(
              str(file_or_data.iloc[0][self.symbol_field_name]).lower()
          )
          df = file_or_data
      elif isinstance(file_or_data, Path):
          code = self.get_symbol_from_file(file_or_data)
          df = self._get_source_data(file_or_data)
      else:
          raise ValueError(f"not support {type(file_or_data)}")
      if df is None or df.empty:
          logger.warning(f"{code} data is None or empty")
          return
  
      # try to remove dup rows or it will cause exception when reindex.
      df = df.drop_duplicates(self.date_field_name)
  
      # features save dir
      features_dir = self._features_dir.joinpath(
          code_to_fname(code).lower()
      )
      features_dir.mkdir(parents=True, exist_ok=True)
      self._data_to_bin(df, calendar_list, features_dir)
  
imports: import abc
  import shutil
  import traceback
  from pathlib import Path
  from typing import Iterable, List, Union
  from functools import partial
  from concurrent.futures import ThreadPoolExecutor, as_completed, ProcessPoolExecutor
  import fire
  import numpy
  import pandas
  from tqdm import tqdm
  from loguru import logger
  from qlib.utils import fname_to_code, code_to_fname
label_desc: Use image node_id 15 for calling the DumpDataBase obj's underlying member method code with example usage: obj._dump_bin(file_or_data, calendar_list) without return types