import re


def nice(name):
    """Generate a nice name based on the given string.

    Examples:
        >>> names = [
        ...     "simple_command",
        ...     "simpleCommand",
        ...     "SimpleCommand",
        ...     "Simple command",
        ... ]
        >>> for name in names:
        ...     nice(name)
        'Simple Command'
        'Simple Command'
        'Simple Command'
        'Simple Command'

    Arguments:
        name (str): The string from which generate the nice name.

    Returns:
        str: The generated nice name.
    """
    # The regular expression will match all upper case characters except the
    # one that starts the string and insert a space before it.
    return re.sub(r"(?<!^)([A-Z])", r" \1", name).replace("_", " ").title()