code: def save_csv(
      data: List[Dict],
      fp: Path,
      save_in_tsv: False,
      write_head=True,
      verbose=True,
  ) -> None:
      """
      保存csv格式文件
      Args :
          data (List) : 所需保存的List数据
          fp (String) : 保存地址
          save_in_tsv (bool) : 是否保存为excel-tab格式
          write_head (bool) : 是否写表头
          verbose (bool) : 是否打印日志
      """
      if verbose:
          logger.info(f"save csv file in: {fp}")
  
      with open(fp, "w", encoding="utf-8") as f:
          fieldnames = data[0].keys()
          dialect = "excel-tab" if save_in_tsv else "excel"
          writer = csv.DictWriter(
              f, fieldnames=fieldnames, dialect=dialect
          )
          if write_head:
              writer.writeheader()
          writer.writerows(data)
  
file_path: DeepKE/src/deepke/attribution_extraction/standard/utils/ioUtils.py
imports: import os
  import csv
  import json
  import pickle
  import logging
  from typing import NewType, List, Tuple, Dict, Any
label_desc: Use image node_id 4 for calling a global function with example usage: save_csv(data, fp, save_in_tsv, write_head, verbose) without return types