code: def ensure_dir(path):
      try:
          os.makedirs(path)
      except OSError as e:
          if e.errno != errno.EEXIST or not os.path.isdir(path):
              raise
  
imports: import codecs
  import errno
  import logging
  import os
  import random
  import shutil
  import six
  import stat
  import sys
  import library.python.func
  import library.python.strings
  import library.python.windows
label_desc: Use image node_id 1 for calling a global function with example usage: ensure_dir(path) without return types