<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _add_tag_file(zip_file, dir_name, tag_info_list, tag_tup):
 """Add a tag file to zip_file and record info for the tag manifest file."""

    tag_name, tag_str = tag_tup
    tag_path = d1_common.utils.filesystem.gen_safe_path(dir_name, tag_name)
    tag_iter = _create_and_add_tag_iter(zip_file, tag_path, tag_str)
    tag_info_list.append(
        {
            'path': tag_path,
            'checksum': d1_common.checksum.calculate_checksum_on_iterator(
                tag_iter, TAG_CHECKSUM_ALGO
            ),
        }
    )