(self, variable, s, policy)
return name
Applies the transforms of a naming policy to a string.

    Takes a string (usually a wireName) which might be in any case and have
    reserved characters in it and transforms by the rules specified. The string
    is divided into parts at reserved characters, then each part is transformed
    by the case rule and then the parts are joined by the reserved character
    replacement.  Multiple reserved characters in a row are treated as one.

    Note that the camel case transformations preserve existing case except for
    the first character of each word. This provides good results for cases
    where the use has provided a camel cased or proper name. E.g. maxResults,
    YouTube, NASA.

    Note: Do we need rule that transforms NASA to Nasa and nasa when in the
    upper and lower camel variations?  That is, if you specify something in
    ALL CAPS, we assume it is not a mixed case spelling.

    Args:
      variable: (CodeObject) The template variable this string came from. This
          is used to extract details about the variable which may be useful in
          building a name, such as the module it belongs to.
      s: (str) A string to transform.
      policy: (NamingPolicy) The naming policy to use for the transform.
    Returns:
      Transformed string.
Applies the transforms of a naming policy to a string.
Applies the transforms of a naming policy to a string .
def TransformString(self, variable, s, policy):
    """Applies the transforms of a naming policy to a string.

    Takes a string (usually a wireName) which might be in any case and have
    reserved characters in it and transforms by the rules specified. The string
    is divided into parts at reserved characters, then each part is transformed
    by the case rule and then the parts are joined by the reserved character
    replacement.  Multiple reserved characters in a row are treated as one.

    Note that the camel case transformations preserve existing case except for
    the first character of each word. This provides good results for cases
    where the use has provided a camel cased or proper name. E.g. maxResults,
    YouTube, NASA.

    Note: Do we need rule that transforms NASA to Nasa and nasa when in the
    upper and lower camel variations?  That is, if you specify something in
    ALL CAPS, we assume it is not a mixed case spelling.

    Args:
      variable: (CodeObject) The template variable this string came from. This
          is used to extract details about the variable which may be useful in
          building a name, such as the module it belongs to.
      s: (str) A string to transform.
      policy: (NamingPolicy) The naming policy to use for the transform.
    Returns:
      Transformed string.
    """
    name = self.ApplyCaseTransform(s, policy)
    if policy.format_string:
      name = self.ApplyFormat(variable, name, policy)

    if name.lower() in self.reserved_words:
      if policy.conflict_policy:
        return self.TransformString(variable, s, policy.conflict_policy)
      else:
        return name + '__'  # Ugly, but works everywhere.
    return name
def TransformString ( self , variable , s , policy ) : name = self . ApplyCaseTransform ( s , policy ) if policy . format_string : name = self . ApplyFormat ( variable , name , policy ) if name . lower ( ) in self . reserved_words : if policy . conflict_policy : return self . TransformString ( variable , s , policy . conflict_policy ) else : return name + '__' # Ugly, but works everywhere. return name