public Optional<EntityShape> getEntityBinding(ToShapeId service, ToShapeId operationOrResource) {
        List<EntityShape> entities = getAllParents(service, operationOrResource);
        return entities.isEmpty() ? Optional.empty() : Optional.of(entities.get(0));
    }
Gets the direct parent of an operation or resource.

@param service Service closure to query.
@param operationOrResource The operation or resource to query.
@return Returns the optionally found parent, a resource or service shape.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/BottomUpIndex.java