import json


def save_dict_to_json(d: dict, file: str) -> str:
    """Save a dictionary to a json file

    Args:
        d (dict): the dictionary to save
        file (str): the file path or filename where you want to save the dictionary

    Returns:
        (str): the filepath of the saved file
    """
    with open(file, "w") as fp:
        json.dump(d, fp, sort_keys=True, indent=4)
    return file