def transfer_seg_data(seg, traverse_queue):
    """Transfer data to child segments.

    Description
    ----------
    Transfers object information from current segment to
    child segments and updates visited parent list.  If all
    parents visited then add to build network queue.

    Parameters
    ----------
    seg: obj
        StreamSegment object.
    traverse_queue: list
        Start list of objects to process.

    Returns
    ----------
    traverse_queue: list
        Updated list of objects to process.
        This may or may not be the same as the input.

    Notes
    ----------
    In addition to returning the queue, segment objects are updated.
    In building upstream network, children would be downstream segments.
    In building downstream network, children would be upstream segments.

    """
    # For each child of segment
    for child in seg.children:
        # Add seg's all parent list and seg to childs all parent list
        child.all_parents.update(seg.all_parents)
        child.all_parents[seg.xstrm_id] = seg
        # Increase child's visited-parent-count by one
        child.visited_parent_cnt += 1
        # If child's visited-parent-count equals the number segments
        # in child' parent list all of child's parent segments
        # have been visited and child is inserted into queue
        if len(child.parents) == child.visited_parent_cnt:
            traverse_queue.append(child)
    return traverse_queue