code: def ensure_parent_dir(path):
      dirname = os.path.dirname(path)
      if dirname:
          os.makedirs(dirname, exist_ok=True)
      return path
  
imports: from .interpolatableHelpers import *
  from .interpolatableTestContourOrder import test_contour_order
  from .interpolatableTestStartingPoint import test_starting_point
  from fontTools.pens.recordingPen import RecordingPen, DecomposingRecordingPen, lerpRecordings
  from fontTools.pens.transformPen import TransformPen
  from fontTools.pens.statisticsPen import StatisticsPen, StatisticsControlPen
  from fontTools.pens.momentsPen import OpenContourError
  from fontTools.varLib.models import piecewiseLinearMap, normalizeLocation
  from fontTools.misc.fixedTools import floatToFixedToStr
  from fontTools.misc.transform import Transform
  from collections import defaultdict
  from types import SimpleNamespace
  from functools import wraps
  from pprint import pformat
  from math import sqrt, atan2, pi
  import logging
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: ensure_parent_dir(path) and returns: path