code: def pickle_dump(obj, file_path, protocol=4):
      dump_path = Path(file_path).absolute()
      dump_path.parent.mkdir(parents=True, exist_ok=True)
      with dump_path.open(mode="wb") as f:
          pickle.dump(obj, f, protocol=protocol)
  
file_path: nni/nni/contrib/distillation/utils.py
imports: from pathlib import Path
  import pickle
  import random
  from typing import Dict, List
  import numpy
  import torch
label_desc: Use image node_id 4 for calling a global function with example usage: pickle_dump(obj, file_path, protocol) without return types