<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def expand_path(path):
 """Returns ``path`` as an absolute path with ~user and env var expansion applied. :API: public """

  return os.path.abspath(os.path.expandvars(os.path.expanduser(path)))