pub fn handler(
    ctx: Context<'_, '_, '_, '_, PopAdapterEvents<'_>>,
    num_events: u32
) -> Result<()>