def add_outputs_from_dict(
        api_current_dict: dict,
        fields_to_keep: list
) -> dict:
    """
    Filters a dict and keeps only the keys that appears in the given list
    :param api_current_dict: the origin dict
    :param fields_to_keep: the list which contains the wanted keys
    :return: a dict based on api_current_dict without the keys that doesn't appear in fields_to_keep
    """
    if not api_current_dict or not fields_to_keep:
        return {}

    group_outputs = {}

    for field_to_keep in fields_to_keep:
        if field_to_keep in api_current_dict.keys():
            group_outputs[field_to_keep] = api_current_dict.get(field_to_keep)

    return group_outputs