Using RVecB with Foreach in PyROOT

EDIT: Unfortunately, I had previously copied and pasted an incorrect error message. Now, it is accurate.

Dear experts,

I cannot succeed in applying a function on each entry of an RDataframe in PyRoot.
The columns that I am dealing with is of type vector<ROOT::VecOps::RVec<bool>>.
I managed to have results with the columns of type: vector<double>, but for some reason that I don’t understand this doesn’t work. Can you help me?

Code:

import ROOT
ROOT.gInterpreter.Declare('#include "RDF_helper.h"')

df = ROOT.RDataFrame("Events", "/users/alikaan.gueven/AOD_to_nanoAOD/data/dataFromFelix-NanoAODv9.root")

df = df.Define("cut_deltaPhi_MET_Lxy", "mask_deltaPhi_MET_Lxy(SDVSecVtx_L_phi, RawMET_phi)", cols=["SDVSecVtx_L_phi", "RawMET_phi"])


ROOT.gInterpreter.Declare("""
    void print_size(ROOT::VecOps::RVec<bool> arr){
        std::cout << arr.size() << std::endl;
    };
""")

print("")
print(type(df.Take["ROOT::RVecB"]("cut_deltaPhi_MET_Lxy")))
print("")

df.Foreach["std::function<void(ROOT::RVecB)>"](ROOT.print_size, ["cut_deltaPhi_MET_Lxy"])

Output:

(<my_env>) [<username>@<hostname> Plotter]$ python tmp_printer.py 
TClass::Init:0: RuntimeWarning: no dictionary for class edm::Hash<1> is available
TClass::Init:0: RuntimeWarning: no dictionary for class edm::ProcessHistory is available
TClass::Init:0: RuntimeWarning: no dictionary for class edm::ProcessConfiguration is available
TClass::Init:0: RuntimeWarning: no dictionary for class edm::ParameterSetBlob is available
TClass::Init:0: RuntimeWarning: no dictionary for class pair<edm::Hash<1>,edm::ParameterSetBlob> is available

<class cppyy.gbl.ROOT.RDF.RResultPtr<vector<ROOT::VecOps::RVec<bool> > > at 0x560988dc3140>

Traceback (most recent call last):
  File "<path_to_file>", line 19, in <module>
    df.Foreach["std::function<void(ROOT::RVecB)>"](ROOT.print_size, ["cut_deltaPhi_MET_Lxy"])
NotImplementedError: Could not instantiate Foreach<std::function<void(ROOT::RVecB)>>:
  void ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Foreach(function<void(RVec<bool> > f, const vector<string>& columns = {}) =>
    NotImplementedError: could not convert argument 1 (this method cannot (yet) be called)

ROOT Version: 6.28/00
Platform: Version 7 CentOS
Compiler: C++17


Hello,
Apologies for the late reply, @vpadulan should be able to help you here