def fluent(func):
@wraps(func)<EOL>def fluent_interface(instance, *args, **kwargs):<EOL><INDENT>ret = func(instance, *args, **kwargs)<EOL>if ret is not None:<EOL><INDENT>return ret<EOL><DEDENT>return instance<EOL><DEDENT>return fluent_interface<EOL>
Fluent interface decorator to return self if method return None.