Yup. It’s the insides of an in-line waste trap.
To stop smells coming back up the plug hole from the drains in the absence of a traditional water filled u-bend
Would that prevent our bathroom sink from glughing, theres a long horizontal ish run from the ensuite to the original bathroom and it glugs for a while after used which usually gets acompanied by a pipe full of stale air coming back though the u bend.
My original* plan was to get some fittings and make a u bend the full height of the washstand such that it doesnt stand a chance of drawing that much vacuum.
*never to be implemented because im lazy