def addusersitepackages(known_paths):
global USER_BASE, USER_SITE, ENABLE_USER_SITE<EOL>env_base = os.environ.get("<STR_LIT>", None)<EOL>def joinuser(*args):<EOL><INDENT>return os.path.expanduser(os.path.join(*args))<EOL><DEDENT>if os.name == "<STR_LIT>":<EOL><INDENT>base = os.environ.get("<STR_LIT>") or "<STR_LIT>"<EOL>if env_base:<EOL><INDENT>USER_BASE = env_base<EOL><DEDENT>else:<EOL><INDENT>USER_BASE = joinuser(base, "<STR_LIT>")<EOL><DEDENT>USER_SITE = os.path.join(USER_BASE,<EOL>"<STR_LIT>" + sys.version[<NUM_LIT:0>] + sys.version[<NUM_LIT:2>],<EOL>"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>if env_base:<EOL><INDENT>USER_BASE = env_base<EOL><DEDENT>else:<EOL><INDENT>USER_BASE = joinuser("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>USER_SITE = os.path.join(USER_BASE, "<STR_LIT>",<EOL>"<STR_LIT>" + sys.version[:<NUM_LIT:3>],<EOL>"<STR_LIT>")<EOL><DEDENT>if ENABLE_USER_SITE and os.path.isdir(USER_SITE):<EOL><INDENT>addsitedir(USER_SITE, known_paths)<EOL><DEDENT>if ENABLE_USER_SITE:<EOL><INDENT>for dist_libdir in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>user_site = os.path.join(USER_BASE, dist_libdir,<EOL>"<STR_LIT>" + sys.version[:<NUM_LIT:3>],<EOL>"<STR_LIT>")<EOL>if os.path.isdir(user_site):<EOL><INDENT>addsitedir(user_site, known_paths)<EOL><DEDENT><DEDENT><DEDENT>return known_paths<EOL>
Add a per user site-package to sys.path

    Each user has its own python directory with site-packages in the
    home directory.

    USER_BASE is the root directory for all Python versions

    USER_SITE is the user specific site-packages directory

    USER_SITE/.. can be used for data.