Custom puppet function to generate a collector