from typing import Dict


def _sort_dictionary_alphabetically(
    input_inv_dict: Dict[str, float]
) -> Dict[str, float]:
    """
    Sorts a dictionary alphabetically by its keys.

    Parameters
    ----------
    input_inv_dict : dict
        Dictionary containing radionuclide strings or Radionuclide objects as keys and activities
        as values.

    Returns
    -------
    dict
        Inventory dictionary which has been sorted by the radionuclides alphabetically.

    Examples
    --------
    >>> rd.inventory._sort_dictionary_alphabetically({'U-235': 1.2, 'Tc-99m': 2.3, 'Tc-99': 5.8})
    {'Tc-99': 5.8, 'Tc-99m': 2.3, 'U-235': 1.2}

    """

    return dict(sorted(input_inv_dict.items(), key=lambda x: x[0]))