import textwrap


def box(text, decor='*', decor_x=None, decor_y=None,
        boxwidth=60, borderwidth=2):
    """Create a formatted textbox for highlighting important information"""
    decor_x = decor_x if decor_x else decor
    decor_y = decor_y if decor_y else decor
    decor_x_width = len(decor_x) if len(decor_x) > 0 else 1
    decor_y_width = len(decor_y) if len(decor_y) > 0 else 1
    decor_x_multiplier = int(boxwidth / decor_x_width)
    decor_y_multiplier = decor_y_width * 2

    textwidth = boxwidth - decor_y_multiplier - (borderwidth * 2)
    text = textwrap.wrap(text, textwidth)
    text = "\n".join([
        "{decor_y}{text}{decor_y}".format(
            decor_y=decor_y, text=m.center(
                boxwidth - decor_y_multiplier)) for m in text])
    border_x = (decor_x * decor_x_multiplier)
    border_space = "{decor_y}{spacer}{decor_y}".format(
        decor_y=decor_y, spacer=(" " * (boxwidth - decor_y_multiplier)))
    spacing = (' ' * boxwidth)
    text = "\n".join([
        spacing, border_x, border_space, text,
        border_space, border_x, spacing])
    print(text)
    return text