def Trace_finder(lines:list):
    """Finds traces index from data. And extract eact trace section from data

    Args:
        lines (list): A list of lines from '.ndf' file.

    Returns:
        trace_sections (list): A list of trace sections.
    """
    trace_index = []
    # segment_index = []
    for line in lines:
        if line.startswith('// Tracing'):
            trace_index.append(lines.index(line))
        # if line.startswith('// Segment'):
        #     segment_index.append(lines.index(line))

    trace_sections = []
    for t in trace_index:
        if trace_index.index(t) < len(trace_index)-1:
            trace_sections.append(lines[t:trace_index[trace_index.index(t)+1]])
        else:
            trace_sections.append(lines[t:])
    
    return trace_sections