code: def safe_makedirs(path):
      try:
          os.makedirs(path)
      except OSError:
          if not os.path.isdir(path):
              raise
  
imports: from __future__ import absolute_import
  import os
  import sys
  import re
  import io
  import codecs
  import shutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 8 for calling a global function with example usage: safe_makedirs(path) without return types