<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def install_dependencies(python) -> str: """ Copy aiohttp and virtualenv install locations (and their transitive dependencies in new virtualenv so that the update server can install without access to full system site-packages or connection to the internet. Full access to system site-packages causes the install inside the virtualenv to fail quietly because it does not have permission to overwrite a package by the same name and then it picks up the system version of otupdate. Also, we have to do a copy rather than a symlink because a non- admin Windows account does not have permissions to create symlinks. """

    # Import all of the packages that need to be available in the virtualenv
    # for the update server to boot, so we can locate them using their __file__
    # attribute
    import aiohttp
    import virtualenv_support
    import async_timeout
    import chardet
    import multidict
    import yarl
    import idna
    import pip
    import setuptools
    import virtualenv

    # Determine where the site-packages directory exists in the virtualenv
    tmpdirname = python.split(VENV_NAME)[0]
    paths_raw = sp.check_output(
        '{} -c "import sys; [print(p) for p in sys.path]"'.format(python),
        shell=True)
    paths = paths_raw.decode().split()
    venv_site_pkgs = list(
        filter(
            lambda x: tmpdirname in x and 'site-packages' in x, paths))[-1]

    dependencies = [
        ('aiohttp', aiohttp),
        ('virtualenv_support', virtualenv_support),
        ('async_timeout', async_timeout),
        ('chardet', chardet),
        ('multidict', multidict),
        ('yarl', yarl),
        ('idna', idna),
        ('pip', pip),
        ('setuptools', setuptools),
        ('virtualenv.py', virtualenv)]

    # Copy each dependency from is system-install location to the site-packages
    # directory of the virtualenv
    for dep_name, dep in dependencies:
        src_dir = os.path.abspath(os.path.dirname(dep.__file__))
        dst = os.path.join(venv_site_pkgs, dep_name)
        if os.path.exists(dst):
            log.debug('{} already exists--skipping'.format(dst))
        else:
            log.debug('Copying {} to {}'.format(dep_name, dst))
            if dep_name.endswith('.py'):
                shutil.copy2(os.path.join(src_dir, dep_name), dst)
            else:
                shutil.copytree(src_dir, dst)
    return venv_site_pkgs