<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def log_decl_method(func):
 """Decorate do_declartion methods for debug logging."""

    from functools import wraps

    @wraps(func)
    def with_logging(*args, **kwargs):
        self = args[0]
        decl = args[2]
        log(DEBUG, u"    {}: {} {}".format(
            self.state['current_step'], decl.name,
            serialize(decl.value).strip()).encode('utf-8'))
        return func(*args, **kwargs)
    return with_logging