def transform_data(data):
    """
        Invoked once for each record.
        Input: decoded data
        Output: manipulated data
    """
    print("Processing data: %s" % data)

    # example: you can skip records
    # if 'nsfw' in data:
    #     raise DroppedRecordException()

    # example: you can add new fields
    # data['new_value'] = True

    # return the transformed data dictionary
    return data