<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_timestamps(obj):
 """ Convert unix timestamps in the scraper output to python datetimes so that they will be saved properly as Mongo datetimes. """

    for key in ('date', 'when', 'end', 'start_date', 'end_date'):
        value = obj.get(key)
        if value:
            try:
                obj[key] = _timestamp_to_dt(value)
            except TypeError:
                raise TypeError("expected float for %s, got %s" % (key, value))

    for key in ('sources', 'actions', 'votes', 'roles'):
        for child in obj.get(key, []):
            convert_timestamps(child)

    return obj