<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, permission):
 """ Update the RoleInstance :param unicode permission: A permission the role should have :returns: Updated RoleInstance :rtype: twilio.rest.chat.v2.service.role.RoleInstance """

        data = values.of({'Permission': serialize.map(permission, lambda e: e), })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return RoleInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )