When called, materialize takes a QgsFeatureRequest argument
and runs it over the source. The resultant features
are saved into a new memory provider based QgsVectorLayer, which
is returned by the function (along with ownership of the layer)
This makes it easy to create a new layer from a subset of an
existing one.
Materialize also considers subsets of attributes, so that the
returned layer only contains fetched fields (and not blank
fields filled with NULL values).