code: def convert_timestamps(obj):
      
      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
docs: Convert unix timestamps in the scraper output to python datetimes
      so that they will be saved properly as Mongo datetimes.