def bpoints2bezier(bpoints):
order = len(bpoints) - <NUM_LIT:1><EOL>if order == <NUM_LIT:3>:<EOL><INDENT>return CubicBezier(*bpoints)<EOL><DEDENT>elif order == <NUM_LIT:2>:<EOL><INDENT>return QuadraticBezier(*bpoints)<EOL><DEDENT>elif order == <NUM_LIT:1>:<EOL><INDENT>return Line(*bpoints)<EOL><DEDENT>else:<EOL><INDENT>assert len(bpoints) in {<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:4>}<EOL><DEDENT>
Converts a list of length 2, 3, or 4 to a CubicBezier, QuadraticBezier,
    or Line object, respectively.
    See also: poly2bez.