def create_random_subfolder(destination):
 folder_name = str(uuid.uuid4())
 if destination.startswith('s3://'):
  parts = destination.split('/')
  parts.append(folder_name)
  return '/'.join(parts)
 else:
  parts = list(os.path.split(destination))
  parts.append(folder_name)
  path = os.path.join(*parts)
  os.makedirs(path)
  return path

def create_random_subfolder ( destination ) : folder_name = str ( uuid . uuid4 ( ) ) if destination . startswith ( 's3://' ) : parts = destination . split ( '/' ) parts . append ( folder_name ) return '/' . join ( parts ) else : parts = list ( os . path . split ( destination ) ) parts . append ( folder_name ) path = os . path . join ( * parts ) os . makedirs ( path ) return path
create a random subdirectory in a given directory .