import re
import yaml


def pretty_yaml(data: list | dict, *, indent=4, width=80) -> str:
    """ Takes a dictionary and returns a string containing the pretty YAML version
    Will add an extra newline for any lines that start with the '-' character in order to space out the output of all
    the DataDog monitors in a more easily readable format
    :param data: A list or dictionary that we want to convert to YAML
    :param indent: *Optional* The desired indent width of the YAML output
    :param width: *Optional* The output width of the YAML output
    :return: The string containing the pretty version of the YAML output
    """
    return re.sub('^-', '\n-', yaml.dump(data, indent=indent, width=width), flags=re.M)