Company: Ubs__
Difficulty: medium
Problem Description Implement a Python decorator named log_message that logs the return value of any function it decorates to a specific text file. Only the decorator implementation is expected. Input The decorator must accept any function as input. The decorated function must correctly accept and pass on any number of positional ( *args ) and keyword ( **kwargs ) arguments to the original wrapped function. Output The decorated function must return the exact string returned by the original wrapped function without any modifications . Side Effect: After each successful call, the decorator must write (append) the returned string to a log file located at /tmp/decorator_logs.txt . Each logged message in the file must be followed by exactly one newline character ( \n ). Constraints The wrapped function will always return a string. The log file must be opened in append mode ( 'a' ) so that previous logs are not overwritten. You only need to define the log_message decorator; do not write exec