code: def save_pickle(data, save_path):
      """
      Saves pickle formatted data (given as "data") as save_path
      Example inputs:
          data: {"image_id": 5}
          save_path: "dirname/coco.pickle"
      """
      # create dir if not present
      Path(save_path).parent.mkdir(parents=True, exist_ok=True)
  
      # export as json
      with open(save_path, "wb") as outfile:
          pickle.dump(data, outfile)
  
imports: import glob
  import json
  import ntpath
  import os
  import pickle
  import re
  import urllib.request
  import zipfile
  from pathlib import Path
  from typing import Optional
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: save_pickle(data, save_path) without return types