The task is to implement a Python decorator function deprecated which is used to mark functions and methods as deprecated. The decorator should take a message string as input, which is intended to inform users about the deprecation details.
Requirements:
Functionality: The deprecated function should return a decorator that, when applied to a function:
Issues a deprecation warning message when the decorated function is called.
Works correctly for both synchronous and asynchronous functions.
Input Behavior:
The input to the deprecated function is a string message that specifies that the function is deprecated and suggests alternatives.
Output Behavior:
The output should be the decorated function that invokes the warning mechanism and then calls the original function.
Edge Cases:
The decorator must correctly handle both synchronous and asynchronous functions.
Ensure that no deprecation warning is triggered if the original function is never called.
The decorator must function correctly with arbitrary arguments and keyword arguments.
File Structure:
The solution should be placed in /app/solution.py.
The function should be importable as: from solution import deprecated.