private List<Line> parseMemberShape(SourceLocation location, MemberShape member) {
        // Members should always crawl up to the defining shape in both the IDL and JSON.
        Shape container = model.getShape(member.getContainer()).orElse(null);

        // This should never be null, but guard here just in case.
        if (container == null) {
            LOGGER.warning(() -> "Member container not found: " + member.getId() + " -> " + member.getTarget());
        } else {
            SourceLocation containerLocation = container.getSourceLocation();
            // Some basic checking to ensure the member after the container in the same file.
            if (containerLocation.getFilename().equals(location.getFilename())
                    && containerLocation.getLine() < location.getLine()) {
                List<Line> result = new ArrayList<>(2);
                addLineIfValid(containerLocation.getLine(), result);
                addLineIfValid(location.getLine(), result);
                return result;
            }
        }

        return Collections.emptyList();
    }
This class loads model files into memory, one at a time, and either shows leading lines up to a source location or
shows lines that are relevant to a source location use context from a {@link Model}.

<p>Sort sequences of {@link SourceLocation}s before calling {@link #loadContext(FromSourceLocation)} to avoid
needing to open and parse the same file more than once.

@see SourceContextLoader#createLineBasedLoader
@see SourceContextLoader#createModelAwareLoader
smithy-model/src/main/java/software/amazon/smithy/model/loader/sourcecontext/DefaultSourceLoader.java