def generate_int_id(minimum=0, maximum=MYSQL_MAX_INT, used_ids=None):
 if (used_ids is None):
  used_ids = []
 cid = random.randint(minimum, maximum)
 while (cid in used_ids):
  cid = random.randint(minimum, maximum)
 return cid

def generate_int_id ( minimum = 0 , maximum = MYSQL_MAX_INT , used_ids = None ) : if ( used_ids is None ) : used_ids = [ ] cid = random . randint ( minimum , maximum ) while ( cid in used_ids ) : cid = random . randint ( minimum , maximum ) return cid
return a unique integer in the range [minimum .