code: def _safe_mkdir(directory):
      
      try:
          os.makedirs(directory)
      except OSError as error:
          if error.errno != errno.EEXIST:
              raise error
docs: Create a directory, ignoring errors if it already exists.