code: def mkdir_p(path):
      
      if PY3:
          return os.makedirs(path, exist_ok=True)
      try:
          os.makedirs(path)
      except OSError as exc:
          if exc.errno == errno.EEXIST and os.path.isdir(path):
              pass
          else:
              raise
docs: mkdir -p path