def find_package_dependency(glob_string, repo_root_dir):
    package_paths = process_glob_string(glob_string, repo_root_dir, "",
                                        "Regression")
    dependency_map = {}
    for pkg_root in package_paths:
        _, _, _, requires = parse_setup(pkg_root)

        # Get a list of package names from install requires
        required_pkgs = [parse_require(r)[0] for r in requires]
        required_pkgs = [p for p in required_pkgs if p.startswith("azure")]

        for req_pkg in required_pkgs:
            if req_pkg not in dependency_map:
                dependency_map[req_pkg] = []
            dependency_map[req_pkg].append(pkg_root)

    logging.info("Package dependency: {}".format(dependency_map))
    return dependency_map
def find_package_dependency(glob_string, repo_root_dir, dependent_service):
    package_paths = process_glob_string(glob_string, repo_root_dir, "",
                                        "Regression")
    dependent_service_filter = os.path.join('sdk', dependent_service.lower())

    dependency_map = {}
    for pkg_root in package_paths:
        if dependent_service_filter in pkg_root:
            _, _, _, requires = parse_setup(pkg_root)

            # Get a list of package names from install requires
            required_pkgs = [parse_require(r)[0] for r in requires]
            required_pkgs = [p for p in required_pkgs if p.startswith("azure")]

            for req_pkg in required_pkgs:
                if req_pkg not in dependency_map:
                    dependency_map[req_pkg] = []
                dependency_map[req_pkg].append(pkg_root)

    return dependency_map