get_km function

Generate Kaplan-Meier estimates