Actually, I figured out how to call an rpc. It could be like:
with ncs.maapi.single_write_trans('admin','python') as trans:
root=ncs.maagic.get_root(trans)
device=root.devices.device["test"]
out=device.rpc.(model_prefix)__rpc_(rpc_name).(rpc_name)()
trans.apply()
Actually, my only question now is reading operational data as well as modifying the configuration.