<s> """<STR_LIT>""" <EOL> from uuid import uuid4 <EOL> def get_random_string ( prefix = None , suffix = None , size = <NUM_LIT:8> ) : <EOL> """<STR_LIT>""" <EOL> body = '<STR_LIT>' <EOL> base_text = str ( uuid4 ( ) ) . replace ( '<STR_LIT:->' , '<STR_LIT:0>' ) <EOL> if size <= <NUM_LIT:0> : <EOL> body = '<STR_LIT>' . format ( prefix , suffix ) <EOL> else : <EOL> extra = size % len ( base_text ) <EOL> if extra == <NUM_LIT:0> : <EOL> body = base_text * size <EOL> if extra == size : <EOL> body = base_text [ : size ] <EOL> if ( extra > <NUM_LIT:0> ) and ( extra < size ) : <EOL> temp_len = ( size / len ( base_text ) ) <EOL> base_one = base_text * temp_len <EOL> base_two = base_text [ : extra ] <EOL> body = '<STR_LIT>' . format ( base_one , base_two ) <EOL> if prefix is not None : <EOL> body = '<STR_LIT>' . format ( str ( prefix ) , str ( body ) ) <EOL> if suffix is not None : <EOL> body = '<STR_LIT>' . format ( str ( body ) , str ( suffix ) ) <EOL> return body </s>
