parameters: (varstr)
docstring: Given a string, first determine if it looks like a reference
      to a single environment variable, like "$FOO" or "${FOO}".
      If so, return that variable with no decorations ("FOO").
      If not, return None.
docstring_summary: Given a string, first determine if it looks like a reference
      to a single environment variable, like "$FOO" or "${FOO}".
      If so, return that variable with no decorations ("FOO").
      If not, return None.
docstring_tokens: Given a string first determine if it looks like a reference to a single environment variable like $FOO or $ { FOO } . If so return that variable with no decorations ( FOO ) . If not return None .
function: def get_environment_var(varstr):
      """Given a string, first determine if it looks like a reference
      to a single environment variable, like "$FOO" or "${FOO}".
      If so, return that variable with no decorations ("FOO").
      If not, return None."""
      mo=_get_env_var.match(to_String(varstr))
      if mo:
          var = mo.group(1)
          if var[0] == '{':
              return var[1:-1]
          else:
              return var
      else:
          return None
function_tokens: def get_environment_var ( varstr ) : mo = _get_env_var . match ( to_String ( varstr ) ) if mo : var = mo . group ( 1 ) if var [ 0 ] == '{' : return var [ 1 : - 1 ] else : return var else : return None