code: def create_dir(path):
      
      if os.path.exists(path):
          if not os.path.isdir(path):
              logger.error('%s is not a directory', path)
              sys.exit(1)
          else:  # ignore
              pass
      else:
          os.makedirs(path)
          logger.info('Create dir: %s', path)
docs: Create dir with the path
  
      :param path: The path to be created
      :type path: str