def __GENERATED__(self, t, obj, ctx, /):
    try:
        v_0 = obj.x if isinstance(obj.x, int) else serialize(self, int, obj.x, ctx)
        v_1 = obj.y if isinstance(obj.y, int) else serialize(self, int, obj.y, ctx)
        return {'x': v_0,'y': v_1}
    except SerieuxError:
        raise
    except Exception as exc:
        raise ValidationError(exc=exc, ctx=ctx)
