[keystone] how to write a plugin?