public Map<MemberShape, ContextParamTrait> getContextParams(Shape operation) {
        if (!operation.isOperationShape()) {
            throw new IllegalArgumentException(operation.toShapeId() + " is not an operation shape");
        }

        OperationIndex operationIndex = OperationIndex.of(getModel());
        Map<MemberShape, ContextParamTrait> contextParams = new HashMap<>();
        for (MemberShape member : operationIndex.getInputMembers(operation).values()) {
            if (member.hasTrait(ContextParamTrait.ID)) {
                contextParams.put(member, member.expectTrait(ContextParamTrait.class));
            }
        }
        return MapUtils.copyOf(contextParams);
    }
Gets the mapping of {@link MemberShape} to {@link ContextParamTrait} for the operation.

@param operation The operation shape.
@return The mapping of operation's {@link MemberShape} to {@link ContextParamTrait}.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/traits/ContextIndex.java