Data block API ItemList(s) implementation

Hello,

I have a bit of a struggle understanding some designs of the data block API. Especially I am trying to understand the labeling process of an ItemLists, say .label_from_re(). As showed in the online course nbs, you should call: ImageList().label_from_re()
However, label_from_re is a method attached to the ItemList class, which btw uses basically two important attributes of the ItemList class(_split and items).

So my main question is how come you can use this method while the two classes do not share any inheritance ? Specially when the method calls explicitly some attributes which are not redundant over both classes.
I noticed this method is referenced in the dir() of the ItemLists. I could not find any reference about this pattern on google.

Another thing i struggle to understand, which maybe as to do with the piping, is the fact that .label_from_re() returns a LabelList. In the same example, you can use .databunch() on it. However this method in implemented to return invariably an exception. So what’s the trick ?

Cheers