The premise here is that a single repository can contain multiple "projects" that should be tested separately. This separation is accomplished by taking a selection of the PACKAGE_LABEL label.
This is fed into package_adaptor, because we want to have results for different projects in different places. (They can later be aggregated. That is a piece of functionality not relevant to this rambling monologue.)
The first two functions in the screenshot are somewhat instructive for how this is all meant to be used. There are two kinds of class that expose a "value" property ("Parametric" and "MappedSelection"), and both are usable by the "adaptive" decorator. The point of the "value" property is to, in a hopefully controlled way, subvert the type system. To Mypy*, it presents itself as a value of the type that the class is parametrized over; at runtime, it is a wrapper that is read by the decorator in order to construct a new parametric value.
*This code base can't work with other type checkers.
