def METHOD_NAME(
    cls: Type["DepthMap"],
    raw_segments: Sequence[RawSegment],
    root_segment: BaseSegment,
) -> "DepthMap":
    """Generate a DepthMap a sequence of raws and a root.
    NOTE: This is the less efficient way to construct a DepthMap
    as it doesn't take advantage of caching in the same way as
    `from_parent`.
    """
    buff = []
    for raw in raw_segments:
        stack = root_segment.path_to(raw)
        buff.append((raw, stack))
    return cls(raws_with_stack=buff)