code: def ensure_dir(f):
      d = os.path.dirname(f)
      if not os.path.exists(d):
          os.makedirs(d)
  
file_path: MMdnn/tests/utils.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import os
  import unittest
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: ensure_dir(f) without return types