def METHOD_NAME(self, section):
    '''
    Parses either the exclusive or inclusive sections of the TinyProfiler output
    Parameters
    ----------
    section (string): The section to parse the profiling output,
        either 'excl' for exclusive or 'incl' for inclusive.
    Returns
    -------
    The number of lines that were parsed
    '''
    if section != "excl" and section != "incl":
        raise RuntimeError(f"'section' was not either 'excl' or 'incl', instead was {section}")
    count = 0
    for line in self.lines:
        if "------" in line:
            break
        # these lines are of the form "Function()  ncalls  min  avg  max  max_percent"
        # with more spaces than are here
        # replace the multiple spaces with a single space
        line = re.sub(" +", " ", line)
        values = line.split(" ")
        # work backwards through the values in order to capture function names with spaces.
        max_percent = float(values[-1].replace("%", ""))
        max_time = float(values[-2])
        avg = float(values[-3])
        min_time = float(values[-4])
        n_calls = int(values[-5])
        name = "_".join(values[0:-5])
        dict = {
            "frame" : {"name" : name},
            "metrics" : {
                "n_calls" : n_calls,
                f"{section}_min" : min_time,
                f"{section}_avg" : avg,
                f"{section}_max" : max_time,
                f"{section}_max_percent" : max_percent
            }
        }
        self.function_profiles.append(dict)
        count = count + 1
    return count