Company: Ubs__
Difficulty: medium
Log Message Decorator Problem Description Implement a Python decorator named log_message that logs the return value of every function it decorates to a log file. Only the decorator is your work; the provided main() decorates a fixed set of functions with it, calls them, and prints what happened. The decorator must: Accept any function as input and return a wrapped function. Forward any number of positional ( *args ) and keyword ( **kwargs ) arguments unchanged to the original function. Return the original function's string result unchanged (no stripping, no extra text). After each successful call, append the returned string followed by exactly one newline character ( \n ) to the log file. Open the file in append mode ( 'a' ) so earlier entries are kept, and close it (for example with a with block) so the entry is on disk before the next call returns. If the returned string itself contains newline characters, write it as it is (one extra \n is added only at the end). (inferred -- the so