<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do(self, func, *args, **kwargs):
 """Apply the function to myself, and return myself. Look up the function in the database if needed. Pass it any arguments given, keyword or positional. Useful chiefly when chaining. """

        if not callable(func):
            func = getattr(self.engine.function, func)
        func(self, *args, **kwargs)
        return self