Avoid any own global imports at the cost of some type safety in add_observer