code: def write_pickle(obj, file: str, mode: str = "wb") -> None:
      with open(file, mode) as f:
          pickle.dump(obj, f)
  
file_path: PaddleSeg/contrib/MedicalSeg/tools/preprocess_utils/file_and_folder_operations.py
imports: import os
  import pickle
  import json
  from typing import List
  from .path_utils import join_paths
label_desc: Use image node_id 6 for calling a global function with example usage: write_pickle(obj, file, mode) without return types