Interesting they use eval(), I wonder if their implementations could be changed to not use eval(). I guess in the end you could just use actual classes for these cases, but I sure do like namedtuple and dataclasses.
The issue is that it's dynamically generating methods. There has to be a way to get dynamically created code into python for this use case.