<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action(self, target, message, formatted=True, tags=None):
 """Send an action to the given target."""

        if formatted:
            message = unescape(message)

        self.ctcp(target, 'ACTION', message)