add some annotations to kernel_api.py