@mateiz - are you sure we want this function? It might be good to delay adding this to pyspark pending a clean-up of the `generator` stuff which I think is mostly redundant with the callsite/origin.