public String getContextualName(ToShapeId shape) {
        ShapeId id = shape.toShapeId();
        return rename.getOrDefault(id, id.getName());
    }
Gets the contextual name of a shape within the closure.

<p>If there is a rename property entry for the given shape ID, then
the renamed shape name is returned. Otherwise, the name part of the
given shape ID is returned, regardless of if the shape exists in the
closure of the service.

<p>This is a mirror of {@link ShapeId#getName(ServiceShape)}
that serves to make this functionality more discoverable.

@param shape Shape to get the contextual name of.
@return Returns the contextual name of the shape within the service.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/ServiceShape.java