import textwrap


def _center_wrap(text: str, cwidth: int = 80, **kw) -> str:
    """Centers a text.

    Args:
        text (str): Text to center.
        cwidth (int): Wanted width. Defaults to 80.
        **kw: Arguments of textwrap.wrap

    Returns:
        str: Centered text.
    """
    lines = textwrap.wrap(text, **kw)
    return "\n".join(line.center(cwidth) for line in lines)