set_chunk_attrs function

Set the attributes of the last chunk outputs