def create_display_name(diagnostic_name):
    """
    Converts a diagnostic name to a more easily digestible name
    that can be used as a plot title or in a table of totals.

    Args:
    -----
        diagnostic_name : str
            Name of the diagnostic to be formatted

    Returns:
    --------
        display_name : str
            Formatted name that can be used as plot titles or in tables
            of emissions totals.

    Remarks:
    --------
        Assumes that diagnostic names will start with either "Emis"
        (for emissions by category) or "Inv" (for emissions by inventory).
        This should be an OK assumption to make since this routine is
        specifically geared towards model benchmarking.

    Example:
    --------
        >>> import gcpy
        >>> diag_name = "EmisCO_Anthro"
        >>> display_name = gcpy.create_display_name(diag_name)
        >>> print(display_name)
        CO Anthro
    """

    # Initialize
    display_name = diagnostic_name

    if "SpeciesRst" in display_name:
        display_name = display_name.split("_")[1]

    # Special handling for Inventory totals
    if "INV" in display_name.upper():
        display_name = display_name.replace("_", " ")

    # Replace text
    for v in ["Emis", "EMIS", "emis", "Inv", "INV", "inv"]:
        display_name = display_name.replace(v, "")

    # Replace underscores
    display_name = display_name.replace("_", " ")

    return display_name