As was already stated above, it's a vent tube & catch tank. On these small motors, the crankcase is constantly changing pressure due to the piston traveling up & down in a closed space. The tube is basically an atmospheric vent which allows the rapidly changing pressure/vacuum cycle in the crankcase to equalize itself as the motor runs. Most cars have some type of PCV valve (positive crankcase ventilation) which does the same thing to expel hot vapors.
The funny looking up & down thing is a home made "trap" for oil vapors & droplets to condense & fall to the bottom of the lower line. It's really more of a "mist" of hot oil which is wandering around the motor as it spins. Because there isn't a real oil pump in these motors, they rely on a dipper attached to the connecting rod which slings oil all over the place to lubricate the motor. Hopefully, some of it gets where it needs to be at all times...
Sorry for the long-winded post, but the coffee seems to be working now.