def safe_delete_key(dictionary, key):
    """
    Safely delete a key from a dictionary only if it exists
    :param dictionary: the dictionary
    :param key: the key to delete
    :return: the dictionary
    """
    try:
        del dictionary[key]
    except:
        pass
    return dictionary