how to properly unregister callback of onModifed() of camera

it return an index, but it doesn’t seem to provide a way to unregister it. off() is not availabe to call and if called not seems working either. Thanks.

onModified should return a subscription object.

subscription = camera.onModified(handler)
...
subscription.unsubscribe()

It works, thank for your quick reply.