def make_plant_indices(plant_ids, storage_candidates=None):
    """Make the indices for existing and hypothetical generators for input to Switch.

    :param iterable plant_ids: plant IDs.
    :param set storage_candidates: buses at which to enable storage expansion.
    :return: (*dict*) -- keys are {'existing', 'expansion', 'storage'}, values are
        lists of indices (str) for each sub-type.
    """
    indices = {"existing": [f"g{p}" for p in plant_ids]}
    indices["expansion"] = [f"{e}i" for e in indices["existing"]]
    if storage_candidates is None:
        indices["storage"] = []
    else:
        indices["storage"] = [f"s{b}i" for b in sorted(storage_candidates)]
    return indices