def report(func):
def execute(self, *args, **kwargs):<EOL><INDENT>try:<EOL><INDENT>print("<STR_LIT>".format(n=self.__class__.NAME))<EOL>if hasattr(self, '<STR_LIT:test>'):<EOL><INDENT>if self.test():<EOL><INDENT>return func(self, *args, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>print(colored("<STR_LIT>".format(c=self.__class__.__name__), "<STR_LIT>"))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return func(self, *args, **kwargs)<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>print(colored("<STR_LIT>".format(n=self.__class__.NAME, e = e), "<STR_LIT>"))<EOL><DEDENT><DEDENT>return execute<EOL>
Decorator for method run. This method will be execute before the execution
from the method with this decorator.