import textwrap


def format_titles(sorted_list):
    """
    Returns a list of dictionaries where the titles within the
    dictionaries are formatted so that they have wrapped text
    (to fit inside their given labels).
    """

    wrap_size = 30
    formatted_list = sorted_list
    for dictionary in sorted_list:
        if len(dictionary["title"]) > wrap_size:
            dictionary["title"] = textwrap.fill(dictionary["title"], wrap_size)

    return formatted_list