What is the function of the chloroplasm?

the function of the chloroplasm is realy rarely but is something that save the plant to dont get in a bad form