I recommend you to use std::vector<std::int64_t> instead of IntList because pybind support STL (and conversion with python list), and IntList (ArrayRefstd::int64_t) can be converted from std::vector.
see https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html 3