Towards understanding the planetary nebula luminosity function