How to extrude shape to a smaller size / truncate irregular pyramid

I have a 2D shape and I would like to extrude it but with the extruded face smaller than the original. I suppose you could also think of this as creating a pyramid and truncating it at some point. However, the base shape could be any 2D shape.

Does anyone have any idea how to do this? Here is an image illustrating what I mean, but the base shapes could be concave, convex, any number of points etc:

Thank you in advance!

image

Maybe you can use that?

Multi Form Geometry