parameters: ()
return_statement: return random_unique_id
docstring: Simple function to find a unique number for the target uid
docstring_summary: Simple function to find a unique number for the target uid
docstring_tokens: Simple function to find a unique number for the target uid
function: def find_unique_target_uid():
      """
      Simple function to find a unique number for the target uid
      """
      global UID_MAP_TO_TARGET
      random_retry = 1024
      random_unique_id = apply_target_uid_range(random.randint(MIN_UID_VALUE, MAX_UID_VALUE))
      while random_retry > 0 and random_unique_id in UID_MAP_TO_TARGET:
          random_unique_id = random.randint(MIN_UID_VALUE, MAX_UID_VALUE)
          random_retry -= 1
  
      if random_retry == 0:
          raise Errors.WafError("Unable to generate a unique target id.  Current ids are : {}".format(
              ",".join(list(UID_MAP_TO_TARGET.keys()))))
      return random_unique_id
function_tokens: def find_unique_target_uid ( ) : global UID_MAP_TO_TARGET random_retry = 1024 random_unique_id = apply_target_uid_range ( random . randint ( MIN_UID_VALUE , MAX_UID_VALUE ) ) while random_retry > 0 and random_unique_id in UID_MAP_TO_TARGET : random_unique_id = random . randint ( MIN_UID_VALUE , MAX_UID_VALUE ) random_retry -= 1 if random_retry == 0 : raise Errors . WafError ( "Unable to generate a unique target id.  Current ids are : {}" . format ( "," . join ( list ( UID_MAP_TO_TARGET . keys ( ) ) ) ) ) return random_unique_id