def summarize_segments(segments):
    """Take a list of segments and create a simple summary"""

    if len(segments) > 0:
        on_floor = sum([x["duration"] for x in segments if x["location"] == 'on floor'])
        off_floor = sum([x["duration"] for x in segments if x["location"] == 'off floor'])
        working = sum([x["duration"] for x in segments if x["condition"] == 'working'])
        not_working = sum([x["duration"] for x in segments if x["condition"] == 'not working'])

        on_floor_pct = round(on_floor / (on_floor + off_floor) * 100, 2)
        off_floor_pct = round(off_floor / (on_floor + off_floor) * 100, 2)
        working_pct = round(working / (working + not_working) * 100, 2)
        not_working_pct = round(not_working / (working + not_working) * 100, 2)
    else:
        on_floor_pct = 0
        off_floor_pct = 0
        working_pct = 0
        not_working_pct = 0

    return {"on_floor": on_floor_pct,
            "off_floor": off_floor_pct,
            "working": working_pct,
            "not_working": not_working_pct}