code: def jsonld2csv(fp: str, verbose: bool = True) -> str:
      """
      读入 jsonld 文件，存储在同位置同名的 csv 文件
      Args:
          fp (String): jsonld 文件地址
          verbose (bool): 是否打印日志
      Return:
          fp_new (String):文件地址
      """
      data = []
      root, ext = os.path.splitext(fp)
      fp_new = root + ".csv"
      if verbose:
          print(f"read jsonld file in: {fp}")
      with open(fp, encoding="utf-8") as f:
          for l in f:
              line = json.loads(l)
              data.append(line)
      if verbose:
          print("saving...")
      with open(fp_new, "w", encoding="utf-8") as f:
          fieldnames = data[0].keys()
          writer = csv.DictWriter(
              f, fieldnames=fieldnames, dialect="excel"
          )
          writer.writeheader()
          writer.writerows(data)
      if verbose:
          print(f"saved csv file in: {fp_new}")
      return fp_new
  
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 7 for calling a global function with example usage: jsonld2csv(fp, verbose) and returns: fp_new