| 65 | } |
| 66 | |
| 67 | pybind11::object reduce(pybind11::object& accumulator) { |
| 68 | return bolt::python::pyTry<pybind11::object>( |
| 69 | [&]() { return accumulator.attr("reduce")(); }, |
| 70 | [&]() { |
| 71 | return fmt::format( |
| 72 | "Failure during call to 'reduce()' method from python object of type: '{}'.", |
| 73 | bolt::python::pyInstanceTypeStr(accumulator)); |
| 74 | }); |
| 75 | } |
| 76 | |
| 77 | pybind11::object initAggregator(pybind11::object& cls) { |
| 78 | return bolt::python::pyTry<pybind11::object>( |