parameters: (string, expansions)
return_statement: return string
docstring: Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
    expansions list. If the variable expands to something that references
    another variable, this variable is expanded as well if it's in env --
    until no variables present in env are left.
docstring_summary: Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
    expansions list. If the variable expands to something that references
    another variable, this variable is expanded as well if it's in env --
    until no variables present in env are left.
docstring_tokens: Expands $ { VARIABLES } $ ( VARIABLES ) and $VARIABLES in string per the expansions list . If the variable expands to something that references another variable this variable is expanded as well if it s in env -- until no variables present in env are left .
function: def ExpandEnvVars(string, expansions):
      """Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
    expansions list. If the variable expands to something that references
    another variable, this variable is expanded as well if it's in env --
    until no variables present in env are left."""
      for k, v in reversed(expansions):
          string = string.replace("${" + k + "}", v)
          string = string.replace("$(" + k + ")", v)
          string = string.replace("$" + k, v)
      return string
function_tokens: def ExpandEnvVars ( string , expansions ) : for k , v in reversed ( expansions ) : string = string . replace ( "${" + k + "}" , v ) string = string . replace ( "$(" + k + ")" , v ) string = string . replace ( "$" + k , v ) return string