def cut_include_start_end(some_text, start_text, end_text, maximum_lines_per_section=10000):
    """ from some_text (output from Network device session), returns a List of List(strings), sections of some_text
    containing the lines between StartText to EndText, INCLUDING StartText and EndText on the returning sections.
    Used when the output from the Network Device needs to be trimmed before is processed.
    to extract sections (e.g. Interfaces)
    :param some_text usually the full command output
    :param start_text the text that defines the begging of a section
    :param end_text the text that defines the ending of a section
    :param maximum_lines_per_section if the end_text is not found yet how many lines we want to take in a section
    """
    include = False
    matching_list_text = []
    list_content = []
    counter = 0
    for line in some_text:
        if not include:
            if line.find(start_text) >= 0:
                include = True
                list_content.append(line)
                counter += 1
        else:
            if line.find(start_text) >= 0:
                matching_list_text.append(list_content)
                list_content = []
                counter = 0
                list_content.append(line)

            elif line.find(end_text) >= 0 or counter >= maximum_lines_per_section:
                include = False
                list_content.append(line)
                matching_list_text.append(list_content)
                list_content = []
                counter = 0
            else:
                list_content.append(line)
                counter += 1
    if len(list_content) > 0:
        matching_list_text.append(list_content)

    return matching_list_text