code: def ensure_directory(path):
      """Ensure that the parent directory of `path` exists"""
      dirname = os.path.dirname(path)
      os.makedirs(dirname, exist_ok=True)
  
imports: import os
  import sys
  from typing import Union
label_desc: Use image node_id 1 for calling a global function with example usage: ensure_directory(path) without return types