def METHOD_NAME(version, packages):
    ipylib_path = compas_rhino._get_rhino_ironpython_lib_path(version)
    scripts_path = compas_rhino._get_rhino_scripts_path(version)
    compas_bootstrapper = compas_rhino._get_bootstrapper_path(scripts_path)
    bootstrapper_data = compas_rhino._get_bootstrapper_data(compas_bootstrapper)
    # Don't modify the original list if we have one
    if packages:
        packages = packages[:]
    else:
        packages = bootstrapper_data.get("INSTALLED_PACKAGES", None)
        # No info, fall back to installable packages list
        if packages is None:
            packages = list(itertools.chain.from_iterable(installable_rhino_packages()))
    # Handle legacy install
    if ipylib_path:
        legacy_bootstrapper = compas_rhino._get_bootstrapper_path(ipylib_path)
        if os.path.exists(legacy_bootstrapper):
            bootstrapper_data = compas_rhino._get_bootstrapper_data(legacy_bootstrapper)
            legacy_packages = bootstrapper_data.get("INSTALLED_PACKAGES", None)
            if legacy_packages:
                packages.extend(legacy_packages)
    return packages