original_docstring: 
      Expands (potentially nested) env vars by repeatedly applying
      `expandvars` and `expanduser` until interpolation stops having
      any effect.
      
docstring: Expands (potentially nested) env vars by repeatedly applying
  `expandvars` and `expanduser` until interpolation stops having
  any effect.
docstring_tokens: Expands ( potentially nested ) env vars by repeatedly applying ` expandvars ` and ` expanduser ` until interpolation stops having any effect .
code: def expand_env_var(env_var):
      """
      Expands (potentially nested) env vars by repeatedly applying
      `expandvars` and `expanduser` until interpolation stops having
      any effect.
      """
      if not env_var:
          return env_var
      while True:
          interpolated = os.path.expanduser(os.path.expandvars(str(env_var)))
          if interpolated == env_var:
              return interpolated
          else:
              env_var = interpolated
code_tokens: def expand_env_var ( env_var ) : if not env_var : return env_var while True : interpolated = os . path . expanduser ( os . path . expandvars ( str ( env_var ) ) ) if interpolated == env_var : return interpolated else : env_var = interpolated
short_docstring: Expands (potentially nested) env vars by repeatedly applying
  `expandvars` and `expanduser` until interpolation stops having
  any effect.
short_docstring_tokens: Expands ( potentially nested ) env vars by repeatedly applying ` expandvars ` and ` expanduser ` until interpolation stops having any effect .
comment: """
      Expands (potentially nested) env vars by repeatedly applying
      `expandvars` and `expanduser` until interpolation stops having
      any effect.
      """