Apparently `py::enum_ ` is deprecated. See https://github.com/pybind/pybind11/issues/5694#issuecomment-2913265027