def make_sure_path_exists(path):
 try:
  os.makedirs(path)
 except OSError as exception:
  if (exception.errno != errno.EEXIST):
   raise

def make_sure_path_exists ( path ) : try : os . makedirs ( path ) except OSError as exception : if ( exception . errno != errno . EEXIST ) : raise
make sure input and output directory exist .