import re


def get_text_paragraphs(text: str) -> list[str]:
    """
    Return a given text as a list of paragraphs.

    Parameters
    ----------
    text: str
        The text string for splitting into paragraphs

    Returns
    -------
    list of str
    """
    # https://stackoverflow.com/a/64863601/295606
    if text:
        if isinstance(text, list):
            text = "\n".join(text)
        NEWLINES_RE = re.compile(r"\n{1,}")
        text = text.strip("\n")  # remove leading and trailing "\n"
        return [p.strip() for p in NEWLINES_RE.split(text) if p.strip()]
    return []