<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _payload_to_dict(self):
 """When an error status the payload is holding an AsyncException that is converted to a serializable dict. """

        if self.status != self.ERROR or not self.payload:
            return self.payload

        import traceback

        return {
            "error": self.payload.error,
            "args": self.payload.args,
            "traceback": traceback.format_exception(*self.payload.traceback)
        }