def _get_new_user_identities_for_remove(exist_user_identity_dict, user_identity_list_to_remove):
    """
    :param exist_user_identity_dict: A dict from user-assigned managed identity resource id to identity objecct.
    :param user_identity_list_to_remove: None, an empty list or a list of string of user-assigned managed identity resource id to remove.
    :return A list of string of user-assigned managed identity resource ID.
    """
    if not exist_user_identity_dict:
        return []

    # None
    if user_identity_list_to_remove is None:
        return list(exist_user_identity_dict.keys())

    # Empty list means remove all user-assigned managed identities
    if len(user_identity_list_to_remove) == 0:
        return []

    # Non-empty list
    new_identities = []
    for id in exist_user_identity_dict.keys():
        if not id.lower() in user_identity_list_to_remove:
            new_identities.append(id)

    return new_identities