async def METHOD_NAME(
    request: InferCCDependenciesRequest,
    cc_files_mapping: CCFilesMapping,
    cc_infer: CCInferSubsystem,
) -> InferredDependencies:
    if not cc_infer.includes:
        return InferredDependencies([])
    address = request.field_set.address
    explicitly_provided_deps, hydrated_sources = await MultiGet(
        Get(ExplicitlyProvidedDependencies, DependenciesRequest(request.field_set.dependencies)),
        Get(HydratedSources, HydrateSourcesRequest(request.field_set.sources)),
    )
    digest_contents = await Get(DigestContents, Digest, hydrated_sources.snapshot.digest)
    assert len(digest_contents) == 1
    file_content = digest_contents[0]
    file_path = PurePath(file_content.path)
    includes = parse_includes(file_content.content.decode())
    result: OrderedSet[Address] = OrderedSet()
    for include in includes:
        # Skip system-path includes.
        if include.system_paths_only:
            continue
        # First try to resolve the include's path against the same directory where the file is.
        maybe_relative_file_path = file_path.parent.joinpath(include.path)
        maybe_relative_address = cc_files_mapping.mapping_not_stripped.get(
            str(maybe_relative_file_path)
        )
        if maybe_relative_address:
            result.add(maybe_relative_address)
            continue
        # Otherwise try source roots.
        if cc_infer.include_from_source_roots:
            unambiguous = cc_files_mapping.mapping.get(include.path)
            ambiguous = cc_files_mapping.ambiguous_files.get(include.path)
            if unambiguous:
                result.add(unambiguous)
            elif ambiguous:
                explicitly_provided_deps.maybe_warn_of_ambiguous_dependency_inference(
                    ambiguous,
                    address,
                    import_reference="file",
                    context=softwrap(
                        f"""
                        The target {address} includes `{include.path}` in the file
                        {file_content.path}
                        """
                    ),
                )
                maybe_disambiguated = explicitly_provided_deps.disambiguated(ambiguous)
                if maybe_disambiguated:
                    result.add(maybe_disambiguated)
    return InferredDependencies(sorted(result))