<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resource_create_ticket(self, token, id, scopes, **kwargs):
 """ Create a ticket form permission to resource. https://www.keycloak.org/docs/latest/authorization_services/index.html#_service_protection_permission_api_papi :param str token: user access token :param str id: resource id :param list scopes: scopes access is wanted :param dict claims: (optional) :rtype: dict """

        data = dict(resource_id=id, resource_scopes=scopes, **kwargs)
        return self._realm.client.post(
            self.well_known['permission_endpoint'],
            data=self._dumps([data]),
            headers=self.get_headers(token)
        )