mgr/BaseMgrModule: Optimize CPython Call in Finish Function
Remove CPython overhead packing tuple during the 'finish' function to
improve memory consumption when we deal with long-string outputs.
When modules like Restful return large amounts of output the use
of PyObject_CallFunction without createing PyObject will reduce the
time the memory held by the mgr.
Fixes: https://tracker.ceph.com/issues/59580
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
(cherry picked from commit
247ace17086ddddd6b7bda44a067d4b1eaa238fd)