Alternating beam directions

The eighth notes may be seemingly attached to different beams, and the corresponding notes connected by ties. Such a situation may occur, for example, in the cello suites.