def realpath(path):
if path == '<STR_LIT>':<EOL><INDENT>return userdir<EOL><DEDENT>if path == '<STR_LIT:/>':<EOL><INDENT>return sysroot<EOL><DEDENT>if path.startswith('<STR_LIT:/>'):<EOL><INDENT>return os.path.abspath(path)<EOL><DEDENT>if path.startswith('<STR_LIT>'):<EOL><INDENT>return os.path.expanduser(path)<EOL><DEDENT>if path.startswith('<STR_LIT>'):<EOL><INDENT>return os.path.abspath(os.path.join(os.path.curdir, path[<NUM_LIT:2>:]))<EOL><DEDENT>return os.path.abspath(path)<EOL>
Create the real absolute path for the given path.

Add supports for userdir & / supports.

Args:
    * path: pathname to use for realpath.

Returns:
    Platform independent real absolute path.