def METHOD_NAME(contents: list[PageElement], indent: int) -> tuple[str, bool]:
    """Converts the list items to plaintext. It will recurse when a nested list element is
    encountered and when other elements are encountered.
    Parameters
    ----------
    contents: list[PageElement]
        List of the children of a list item element. The children can be either another
        element or a text.
    indent: int
        The amount of space used to indent list items.
    Returns
    -------
    tuple[str, bool]
        The text equivalent of the list item children and if the children contain a
        paragraph.
    """
    text = ''
    has_nested_list = False
    has_paragraph = False
    for child in contents:
        if isinstance(child, Tag):
            if child.name in ('ol', 'ul'):
                text += '\n' + _handle_list(child, indent + 2)
                has_nested_list = True
            else:
                if child.name == 'p':
                    has_paragraph = True
                text += _handle_tag(child)
        elif isinstance(child, str) and child != '\n':
            text += child
    if not has_nested_list and not has_paragraph:
        text += '\n'
    return text, has_paragraph