<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _wrap_result(self, response):
 """Wraps child's response in a HandlerResult to be sent back to client. Args: response (enum or dict):
 Either an integer status enum, or a dict of attributes to be added to the protobuf response. """

        if isinstance(response, int):
            response = self._wrap_response(response)

        return HandlerResult(
            status=HandlerStatus.RETURN,
            message_out=self._response_proto(**response),
            message_type=self._response_type)