def extract_full_artifact_map_path(artifact_map, basepath, locale):
    """Find the artifact map entry from the given path."""
    for entry in artifact_map:
        if entry['locale'] != locale:
            continue
        for path in entry['paths']:
            if path.endswith(basepath):
                return path
