def setAttributes(segments, attributes):
    """
        Set `attributes` for segment.

        `attributes` is a dictionary of:
         * size -> s.st_size
         * uid -> s.st_uid
         * gid -> s.st_gid
         * mode -> s.st_mode
         * atime -> int(s.st_atime)
         * mtime -> int(s.st_mtime)
        """
