def METHOD_NAME(row, state, tap_stream_id, replication_key_name):
    replication_key_value = row.get(replication_key_name)
    if replication_key_value:
        replication_key_type = replication_key_value.__class__.__name__
        replication_key_value_bookmark = common.class_to_string(replication_key_value,
                                                                replication_key_type)
        state = singer.write_bookmark(state,
                                      tap_stream_id,
                                      'replication_key_value',
                                      replication_key_value_bookmark)
        state = singer.write_bookmark(state,
                                      tap_stream_id,
                                      'replication_key_type',
                                      replication_key_type)