Use this function to display a banner before and after a command/

    This function is used for surrounding a Helium CLI command with a banner.
    This will show what the command is for and separate out the command
    making it easier to see what is part of the commands output (if any).

    :param title: the title the banner should display at the top of the
                  command.
    :type title: str
    :param banner_colour: the colour of the banner.
    :type banner_colour: str
    :return: the results of the decorator function.
    :rtype: n/a

def command_banner(title, banner_colour='white'):
    """Use this function to display a banner before and after a command/

    This function is used for surrounding a Helium CLI command with a banner.
    This will show what the command is for and separate out the command
    making it easier to see what is part of the commands output (if any).

    :param title: the title the banner should display at the top of the
                  command.
    :type title: str
    :param banner_colour: the colour of the banner.
    :type banner_colour: str
    :return: the results of the decorator function.
    :rtype: n/a
    """
    size = get_terminal_size()

    def decorator(function):
        """Use this function to create the basic decorator.

        This function is used for defining the decorator and having the outer
        function pass the variables passed to this decorator for use in the
        wrapper function.

        :param function: the function to decorate.
        :type function: n/a
        :return: the results of the wrapper function.
        :rtype: n/a
        """
        @wraps(function)
        def wrapper(*args, **kwargs):
            """Use this function to wrap the decorated function.

            This function is used for providing the banner around the
            decorated function.
            """
            banner_length = size[0] - 3
            top_banner_length = banner_length - len(title) - 2
            echo('')
            secho('|{0} {1} {0}|'.format(
                '-' * floor(top_banner_length / 2), title
            ), fg=banner_colour)
            echo('')
            function(*args, **kwargs)
            echo('')
            secho('|{0}|'.format('-' * banner_length), fg=banner_colour)
            echo('')
        return wrapper
    return decorator