parameters: (target_name)
return_statement: return uid
docstring: Derive a target uid based on the target name if possible.  If a collision occurs, raise a WAF Error
      indicating the collision and suggest a unique id that doesnt collide
      :param target_name: The target name to derive the target uid from
      :return: The derived target uid based on the name if possible.
docstring_summary: Derive a target uid based on the target name if possible.  If a collision occurs, raise a WAF Error
      indicating the collision and suggest a unique id that doesnt collide
      :param target_name: The target name to derive the target uid from
      :return: The derived target uid based on the name if possible.
docstring_tokens: Derive a target uid based on the target name if possible . If a collision occurs raise a WAF Error indicating the collision and suggest a unique id that doesnt collide : param target_name : The target name to derive the target uid from : return : The derived target uid based on the name if possible .
function: def derive_target_uid(target_name):
      """
      Derive a target uid based on the target name if possible.  If a collision occurs, raise a WAF Error
      indicating the collision and suggest a unique id that doesnt collide
      :param target_name: The target name to derive the target uid from
      :return: The derived target uid based on the name if possible.
      """
      global UID_MAP_TO_TARGET
  
      # Calculate a deterministic UID to this target initially based on the CRC32 value of the target name
      uid = apply_target_uid_range(zlib.crc32(target_name))
      if uid in UID_MAP_TO_TARGET and UID_MAP_TO_TARGET[uid] != target_name:
          raise Errors.WafError(
              "[ERROR] Unable to generate a unique target id for target '{}' due to collision with target '{}'. "
              "Please update the target definition for target '{}' to include an override target_uid keyword (ex: {}) )"
              "Or consider increasing the MAX_UID_VALUE defined in {}"
                  .format(target_name, UID_MAP_TO_TARGET[uid], target_name, find_unique_target_uid(), __file__))
      UID_MAP_TO_TARGET[uid] = target_name
      return uid
function_tokens: def derive_target_uid ( target_name ) : global UID_MAP_TO_TARGET # Calculate a deterministic UID to this target initially based on the CRC32 value of the target name uid = apply_target_uid_range ( zlib . crc32 ( target_name ) ) if uid in UID_MAP_TO_TARGET and UID_MAP_TO_TARGET [ uid ] != target_name : raise Errors . WafError ( "[ERROR] Unable to generate a unique target id for target '{}' due to collision with target '{}'. " "Please update the target definition for target '{}' to include an override target_uid keyword (ex: {}) )" "Or consider increasing the MAX_UID_VALUE defined in {}" . format ( target_name , UID_MAP_TO_TARGET [ uid ] , target_name , find_unique_target_uid ( ) , __file__ ) ) UID_MAP_TO_TARGET [ uid ] = target_name return uid