Help reproducing 3d shape/shading

Hello I am trying to reproduce this figure. I find puzzling what sort method was used to diagram the “tube”. Any suggestions?

To my eye I believe this was made with PyVista rather than matplotlib. To get that sort of feathered look on the edges of the tube requires ray tracing, which matplotlib doesn’t have.

This seems doable using matplotlib with the S3Dlib 3rd-party package, but I would need to see the functional description explicitly to be certain. (there’s a lot going on in that figure)