code: def _mkdir_if_not_exist(path, logger):
      """
      mkdir if not exists, ignore the exception when multiprocess mkdir together
      """
      if not os.path.exists(path):
          try:
              os.makedirs(path)
          except OSError as e:
              if e.errno == errno.EEXIST and os.path.isdir(path):
                  logger.warning(
                      "be happy if some process has already created {}".format(
                          path
                      )
                  )
              else:
                  raise OSError("Failed to mkdir {}".format(path))
  
file_path: PaddleOCR/ppocr/utils/save_load.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import errno
  import os
  import pickle
  import six
  import paddle
  from ppocr.utils.logging import get_logger
  from ppocr.utils.network import maybe_download_params
label_desc: Use image node_id 1 for calling a global function with example usage: _mkdir_if_not_exist(path, logger) without return types