@Override
    public List<Relationship> operationShape(OperationShape shape) {
        ShapeId input = shape.getInput().orElse(null);
        ShapeId output = shape.getOutput().orElse(null);

        // Calculate the number of relationships up front.
        int assumedRelationshipCount = shape.getErrors().size()
                + (input == null ? 0 : 1)
                + (output == null ? 0 : 1);
        List<Relationship> result = initializeRelationships(shape, assumedRelationshipCount);

        if (input != null) {
            push(result, shape, RelationshipType.INPUT, input);
        }

        if (output != null) {
            push(result, shape, RelationshipType.OUTPUT, output);
        }

        for (ShapeId errorId : shape.getErrors()) {
            push(result, shape, RelationshipType.ERROR, errorId);
        }

        return result;
    }
Finds all neighbors of a shape, returning them as a list of
{@link Relationship} objects.

<p>Each neighbor shape that is not in the provided model will
result in a relationship where the optional
{@link Relationship#getNeighborShape() neighbor shape} is empty.

@see NeighborProvider#of
smithy-model/src/main/java/software/amazon/smithy/model/neighbor/NeighborVisitor.java