After some thoughts : you could pass an opaque ``void* handle`` here to avoid spreading ``ENABLE_PYTHON_MODULE`` everywhere and make sure only ``shared_ref`` gets specialized.